Re: 0.99999998 (was: Unknown SQL)

From: Sam Staton <sam.staton_at_bigfoot.com>
Date: Sat, 21 Jul 2001 23:28:45 GMT
Message-ID: <5j3ghtk8er5pajqmh6iuhpuv0fdd7e2176_at_4ax.com>


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.

Say if two banks, A and B, merge, then if a customer of bank A is called 'Mrs Robinson' and a customer of bank B is called 'Mrs Robinson', then although the strings match textually, there is no guarantee that they are one and the same person. You cannot just import the data.

On Fri, 01 Jun 2001 19:37:37 GMT, robova_at_nextra.sk (Robert Vazan) wrote:

>"Bob Badour" <bbadour_at_golden.net> wrote:
>>[...] The value 1 does

>>not change significantly among different representations. Whether
>>represented with a character string, packed decimal, binary integer, IEEE
>>floating point number or any other representation, the value 1 remains the
>>value 1.
>
>IEEE? Interesting. Do you mean 0.99999998=1? Moving that
>value from representation to representation causes rounding
>problems. Does database recognize it as 1?
>
>And what about TShape#1 = TShape#2? Just curious.
>
>/Robert
Received on Sun Jul 22 2001 - 01:28:45 CEST

Original text of this message