On Fri, Jan 30, 2015 at 3:45 AM, Donald Shepherd <donald.sheph...@gmail.com>

> I'm still not convinced whether it's the behaviour causing my problem, but
> it does look like negative zero is another special case:
> SQLite version 2014-11-18 20:57:56
> Enter ".help" for usage hints.
> sqlite> create table datatable2 (doublevalue real);
> sqlite> insert into datatable2 values(-0.0);

FWIW, "special" doubles like inf, nan, and -0 have no standardized C89 APIs
(they were added in C99), so it is unsurprising that sqlite (C89, aside
from its use of "long long") treats signed and unsigned 0 the same.


According to this page:

"the standard" (it's not clear if they mean C89 or C99) _requires_
"positive and negative zero to test as equal," an implication of which is
that it would be impossible to tell them apart in SQL implementations based
on that.

----- stephan beal
"Freedom is sloppy. But since tyranny's the only guaranteed byproduct of
those who insist on a perfect world, freedom will have to do." -- Bigby Wolf
sqlite-users mailing list

Reply via email to