| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: 0.99999998 (was: Unknown SQL)
On Sun, 3 Jun 2001 12:09:22 -0400, "Bob Badour" <bbadour_at_golden.net> wrote:
>>IEEE gets more complicated than that! In IEEE arithmetic, -0 and +0
>>are distinct values. So 1/-0 == -INF, 1/+0 == +INF. And yet -0 == +0
>>in all tests.
>>
>>I doubt many people will have problems with this particular thing in
>>conversion, but there is a more general point, that is that equality
>>is not as simple a test as it may first seem.
>
>The fact of the matter is: -0 does equal +0. I don't see what the problem
>is.
>
Now we digress!
Let x := -0. Let y := +0. Assume IEEE arithmetic. The following are true.
The following is not true in IEEE, but could have been without inconsistency, and emphasises the point.
d) log(x) == NaN; log(y) == -INF.
So in some cases it looks as though x "equals" y, and in others x "doesn't equal" y !
Although x == y, we need to be careful to preserve the stored value (and the sign) when copying them between platforms. Received on Sat Jul 21 2001 - 18:29:24 CDT
![]() |
![]() |