Subject RE: [firebird-support] Re: Bug: "-0" <> "0" in FB indexes !!!
Author Steffen Heil
Hi

> The value of -0 gives no meaning as distinct from (+)0, and it should
either:
> - not exist in a numeric field
> - be trated correctly as equal to 0.

No.

> I do of course know about binary float formats. Otherwise I'd not be able
to locate the bug. I simply wouldn't believe my eyes ;-)

You are writing 0 and -0, not 0.0 and -0.0, but I assume you really mean
floating point numbers.
So what do floating point numbers mean? They are approximations.

+0.0 means somewhere near 0.0, maybe a litte more.
-0.0 means somewhere near 0.0, maybe a litte less.

[In fact, 0.0 is here used to explain, it does NOT exist at all. Floating
point systems only know about +0.0 and -0.0]

Another point to see, that they are NOT equad:

+1.0 / +0.0 = +infinity
+1.0 / -0.0 = -infinity

This is obviously only true for floating points. As integers are precise, +0
and -0 ARE equal on integers.

Regards,
Steffen