On Thu, Jun 13, 2019, 8:51 AM R Smith <[email protected]> wrote: > On 2019/06/13 4:44 PM, Doug Currie wrote: > >> > >> Except by the rules of IEEE (as I understand them) > >> > >> -0.0 < 0.0 is FALSE, so -0.0 is NOT "definitely left of true zero" > >> > > Except that 0.0 is also an approximation to zero, not "true zero." > > > > Consider that 1/-0.0 is -inf whereas 1/0.0 is +int > > > 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. > > 1/0.0 --> Undefined, doesn't exist, cannot be computed, Should error > out. Anything returning +Inf or -Inf is plain wrong. > I posit the same holds true for 1/-0.0 >
One of the features of the standard is "gradual underflow". I think of it as a limit like concept. Hence why the storage of negative zero has a place, why the computation of x/+-0.0 yields +-inf. It is more than just an artifact of the standard intended to solve certain computational problems. All of that is irrelevant, though. The standard works the way the standard works. SQLite has the option of either rendering -0.0 with or without a sign. Should the system be changed? I think that the possibility of breaking existing SQLite usage by changing the long established text output makes it ill advised to make such a change. Combined with the idea that sometimes SQLite will convert between fp & integer zero on storage, thus losing the sign, illustrates that there is too much history of how SQLite handles numbers already. Such a change would not harm me in any way I can perceive. I have not written any code that depends on -0.0, nor have I written code that depends on the textual conversion thereof. I just think that SQLite's history of maintaining backward compatibility by not gratuitously changing established functionality that some people might depend on, even when it seems like an improvement, should result in no change in the cast of -0.0 to text. _______________________________________________ sqlite-users mailing list [email protected] http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

