James K. Lowden <jklow...@schemamania.org> wrote: > On Wed, 12 Jun 2019 09:35:13 -0400 > Richard Hipp <d...@sqlite.org> wrote: > > > Question: Should SQLite be enhanced to show -0.0 as "-0.0"? > > No. > > 1. Prior art. I can't think of a single programming language that > displays -0.0 without jumping through hoops.
I disagree. I think most languages distinguish between +0.0 and -0.0, +inf, -inf and Nan. At least c, c++, Java, Tcl and probably many others have +0.0 and -0.0. Even my text editor Vim knows about +0.0 and -0.0, +inf, -inf and NaN. In Vim: :echo 1.0 / -0.0 -inf :echo 1.0 / 0.0 inf In tclsh: % expr 1.0 / -0.0 -Inf % expr 1.0 / 0.0 Inf > 2. Math. Negative zero is not a mathematical concept. It's about IEEE 754 which is widely used, and not about math i.e. real numbers. > 3. Utility. There is none. The user is only inconvenienced. There can be uses for it. +0.0 or -0.0 can result in different outcomes when doing intermediate computations. If SQLite deviates from IEEE 754, it's likely to cause issues. I think that a database should be generic enough and not assume that users don't need -0.0. SQLite is written in C and all all C functions which use double already understand +0.0 and -0.0. So I assume that there is hardly any overhead in supporting -0.0 in SQLite. Regards Dominique _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users