On 2019/06/12 3:35 PM, Richard Hipp wrote:
IEEE754 floating point numbers have separate representations for +0.0
and -0.0. As currently implemented, SQLite always display both
quantities as just "0.0".
Question: Should SQLite be enhanced to show -0.0 as "-0.0"? Or,
would that create unnecessary confusion?
1. Personally: I think all systems I'm involved in will be agnostic to
this change, and without confusion.
2. Generally: We see many questions on the forum about IEEE754, but
mostly it's to do with why X == (X-1).9999999nnnnn or why X ==
X.00000000001... etc.
I have seen people ask about the -0.0 vs 0.0 support, but have not seen
many people express confusion about it, or for the opposite in reply to it.
I will say that the go-to argument of people here (Devs included), when
confronted about the small epsilon offsets, is: "Because we IEEE754" - a
valid reason of course, but then it's probably best to adhere to it fully.
That said, it's been working like that flawlessly for years. Continuing
is not a horrible option.
I'd ask: Is it any faster or slower? Does changing get rid of unneeded
code? Is anything else gained from the change (other than proper
IEEE754 adherence)?
In my mind these matter more towards the decision than "will it confuse
some people" (at least with respect to this specific question).
Cheers,
Ryan
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users