upiterbarg / mpmath

Automatically exported from code.google.com/p/mpmath
Other
0 stars 0 forks source link

Signed zero #127

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Should negative zero (-0) be supported? It is virtually supported already;
the object 'fnzero' is defined in libmpf.py (though not used anywhere). It
just needs to be supported in standard operations, and elsewhere "x ==
fzero" needs to be replaced with something else so that -0 is not forwarded
to places where it shouldn't go.

I'm not personally convinced that signed zero is worth the trouble, but it
would be useful for allowing extended compatibility with IEEE 754
semantics, for continuity along branch cuts, etc, and could resolve some
issues in interval arithmetic (although it would also cause some more
complication).

Original issue reported on code.google.com by fredrik....@gmail.com on 3 Feb 2009 at 7:48

GoogleCodeExporter commented 9 years ago
I don't know whether it's useful. It's nice to have. (And when you have the 
choose
between returning +0 or -0, it's trivial to use it.)

Original comment by Vinzent.Steinberg@gmail.com on 4 Feb 2009 at 2:10