On Fri, Jan 30, 2015 at 3:45 AM, Donald Shepherd <donald.sheph...@gmail.com> wrote:
> 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 3.8.7.2 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. http://en.wikipedia.org/wiki/C99#IEEE.C2.A0754_floating_point_support http://stackoverflow.com/questions/9657993/negative-zero-in-c According to this page: http://stackoverflow.com/questions/5095968/does-float-have-a-negative-zero-0f "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 http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal "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 sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users