Subject Re: Bug: "-0" <> "0" in FB indexes !!!
Author bjorgeitteno
--- In firebird-support@yahoogroups.com, Franz-Leo Chomse <franz-
leo.chomse@s...> wrote:
>
> >This is tested with Firebird 1.02, 1.03 & 1.5
> >
> >Anyone knowing this bug ?
>
> That's no bug, that's a feature.
>
> The binary representation of these two values ARE different,
> thus the test for equal fails on lowest level.

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.

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 ;-)

I believe you mix up the two issues: "Is it possible to store the
value of -0 in a floating point variable ?" with this one: "Is the
result of 0*-1 correctly stored as -0 ?"

I really don't care hoiw it's stored, but it's of course not meant to
be treated differently just because the field is indexed.

Just to inform - in the IB group this was immediately recognized as a
bug and put in the bug tracking system. Whether it wil actually *be*
fixed, that's another story.