Signed zeros: is this a bug?

André andre.roberge at
Mon Mar 12 00:35:23 CET 2007

On Mar 11, 7:49 pm, "Paddy" <paddy3... at> wrote:
> Isn't negative zero mathematically the same as zero? Isn't -0 just an
> artefact of the representation of floating point numbers? Shouldn't
> f(0) == f(-0) for all functions f?

Read the original post again...  The relevant part is:
I'm working in a situation
involving complex arithmetic where branch cuts, and hence signed
zeros, are important, and it would be handy if the above code could be
relied upon to do the right thing.

You may want to read about branch cuts and complex arithmetics.  I
don't mean this as a putdown - simply as a useful suggestion for you
to read.


More information about the Python-list mailing list