On Mon, May 20, 2013 at 6:58 PM, Bakhtiyor Zokhidov
<bakhtiyor_zokhi...@mail.ru> wrote:
> ok... I think -0.0 is mathematically wrong but in a program it is true.
>
> What I suspect is that if -0.0 doesn't affect on result (e.g., 2*(-0.0 + 2)
> or (-0.0-2)*2 ) . If it does not affect results it would be good for me

It doesn't affect those computations, no. It does have different
results for division (1/-0.0 -> -inf), and it will often determine
which branch gets evaluated for a complex function that has a branch
point at the origin. These are usually considered good things and are
the primary reason that floating point includes signed zeros.

http://en.wikipedia.org/wiki/Signed_zero

--
Robert Kern
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to