Perhaps this should be handled the same way as Inf and -Inf. For the purposes of conversion to text the value should be 0.0. However, for the purposes of .dump the actual -0.0 should be output just as Inf and -Inf are output as 1e999 and -1e999 respectively, since the purpose of .dump is to be able to re-create the database contents -- and this would require the least amount of changes ...
sqlite> create table x(x); sqlite> insert into x values (-1e999),(-0.0),(0.0),(1e999); sqlite> select * from x; -Inf 0.0 0.0 Inf sqlite> .dump PRAGMA foreign_keys=OFF; BEGIN TRANSACTION; CREATE TABLE x(x); INSERT INTO x VALUES(-1e999); INSERT INTO x VALUES(0.0); INSERT INTO x VALUES(0.0); INSERT INTO x VALUES(1e999); COMMIT; sqlite> --- The fact that there's a Highway to Hell but only a Stairway to Heaven says a lot about anticipated traffic volume. >-----Original Message----- >From: sqlite-users [mailto:sqlite-users- >boun...@mailinglists.sqlite.org] On Behalf Of Doug Currie >Sent: Thursday, 13 June, 2019 09:36 >To: SQLite mailing list >Subject: Re: [sqlite] [SPAM?] Re: [EXTERNAL] Re: Should SQLite >distinguish between +0.0 and -0.0 on output? > >> >> I do not know if this is the result case in any of the programming >> languages, but in Mathematical terms that is just not true. >> > >The related IEEE 754 rules are described here: >https://en.wikipedia.org/wiki/Signed_zero > >e >_______________________________________________ >sqlite-users mailing list >sqlite-users@mailinglists.sqlite.org >http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users