help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Negative zeros?


From: Paul Kienzle
Subject: Re: Negative zeros?
Date: Tue, 13 Sep 2005 21:38:56 -0400


On Sep 13, 2005, at 8:17 PM, Vic Norton wrote:

I am sorry, John, David, and Stephan. I am a mathematician. I don't choose to read nonsense. Zero is zero is zero.

I realize that e-1000000 is positive and -e-1000000 is negative and that these might be represented by 0 and -0 respectively on a machine. But I will never accept that
   0 * (-1) = -0.

So don't think of 0 as zero. Instead think of it as an infinitesimal. It just happens to display as 0. Then a*0 = lim_{x->Inf} a/x = 0. Zero has no floating point representation.

This is consistent with 1/0 -> Inf, 1/Inf -> 0, 1/-0 -> -Inf, 1/-Inf -> 0, and 0*Inf is not a number.

You also need to rationalize why -0 == 0 returns true rather than false. You can do this if you think of the a==b as |a-b|<epsilon for all epsilon>0. Unfortunately, this breaks down for inf==inf. Strictly speaking inf==inf is not defined, especially if you use the definition above because inf - inf is not a number. IEEE floating points defines it as true. Rationalizations can only get you so far.

- Paul



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]