On Wed, Jun 12, 2019, 10:02 AM 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. > > 2. Math. Negative zero is not a mathematical concept. > > 3. Utility. There is none. The user is only inconvenienced. > > Negative zero is an artifact of the IEEE 754, not a feature. By > contrast, IEEE adopted 2s-complement signed integers specificially to > avoid negative zero. That's evidently harder to do with floating > point. ;-) > > I see no advantage to exposing a technical mechanical artifact to the > user. > Further, how much code might exist that depends on the current functionality? Code that converts a real to a string then compares the string value against 0.0. If the decision is made to differentiate 0.0 with a prefixed sign, will all positive values be likewise prefixed with + explicitly when converted to string? I think leaving it with the status quo is the best course of action. _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users