Subject Re: [firebird-support] Re: Bug: "-0" <> "0" in FB indexes !!!
Author Daniel Rail
Hi,

At March 26, 2004, 06:53, Geoff Worboys wrote:

>>> /* INSERT INTO FLOAT_ZERO_TEST (PK, DV) VALUES (-0.0, -0.0);
>>> causes duplicate exception */

>> This *should* word. IEEE floats distiguish between -0 and +0.
>> I DO consider this a BUG.

> I did not know what to think of this, which is why I left it
> in there as a comment.

> I've never seen the actual IEEE standard - and whether it says
> anything about how literals should be interpreted or how +/- 0
> should be compared.

Here are 2 links that I found on Google:
http://www.psc.edu/general/software/packages/ieee/ieee.html
http://research.microsoft.com/~hollasch/cgindex/coding/ieeefloat.html

They both make a distinction between -0.0 and +0.0, because of the
sign bit. It is also possible that a compiler doesn't make the
distinction between them. But, because Firebird's indices are binary
representations of the values, it might(and mostly) possible that the
sign bit is taken into consideration.

--
Best regards,
Daniel Rail
Senior System Engineer
ACCRA Group Inc. (www.accra.ca)
ACCRA Med Software Inc. (www.filopto.com)