Re: [sqlite] [SPAM?] Re: [EXTERNAL] Re: Should SQLite distinguish between +0.0 and -0.0 on output?

2019-06-14 Thread Thomas Kurz
> I'll be happy to eat my words if someone can produce a mathematical paper that argued for the inclusion of -0.0 in IEEE754 to serve a mathematical concept. It's a fault, not a feature. There are indeed very few use cases. The most common one is dealing with water temperature. You can have

Re: [sqlite] [SPAM?] Re: [EXTERNAL] Re: Should SQLite distinguish between +0.0 and -0.0 on output?

2019-06-14 Thread Doug Currie
On Fri, Jun 14, 2019 at 7:16 AM R Smith wrote: > > What I was objecting to, is claiming (in service of suggesting the > use-case for -0.0), [...] > > I'll be happy to eat my words if someone can produce a mathematical > paper that argued for the inclusion of -0.0 in IEEE754 to serve a >

Re: [sqlite] [SPAM?] Re: [EXTERNAL] Re: Should SQLite distinguish between +0.0 and -0.0 on output?

2019-06-14 Thread R Smith
On 2019/06/14 4:23 AM, Richard Damon wrote: On 6/13/19 10:51 AM, R Smith 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,

Re: [sqlite] [SPAM?] Re: [EXTERNAL] Re: Should SQLite distinguish between +0.0 and -0.0 on output?

2019-06-13 Thread Richard Damon
On 6/13/19 10:51 AM, R Smith 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." >> >>

Re: [sqlite] [SPAM?] Re: [EXTERNAL] Re: Should SQLite distinguish between +0.0 and -0.0 on output?

2019-06-13 Thread Olivier Mascia
> Le 13 juin 2019 à 23:29, Richard Hipp a écrit : > > You are right. I had forgotten about that point. This has not been > changed even now, and so -0.0 does get truncated to +0.0 when it is > stored in the database file. Would it cost much, performance-wise, to treat double(-0.0) apart and

Re: [sqlite] [SPAM?] Re: [EXTERNAL] Re: Should SQLite distinguish between +0.0 and -0.0 on output?

2019-06-13 Thread Simon Slavin
On 13 Jun 2019, at 11:08pm, Keith Medcalf wrote: > Note that even when the column is declared with no affinity that NaNs are > stored as null. Other than NaN, all other IEEE754 double values (including > subnormals and +/- Inf) seem to round-trip correctly through the bind_double > and

Re: [sqlite] [SPAM?] Re: [EXTERNAL] Re: Should SQLite distinguish between +0.0 and -0.0 on output?

2019-06-13 Thread Keith Medcalf
SQLite Database >Subject: Re: [sqlite] [SPAM?] Re: [EXTERNAL] Re: Should SQLite >distinguish between +0.0 and -0.0 on output? > >On Fri., 14 Jun. 2019, 7:43 am Keith Medcalf, >wrote: > >> On Thursday, 13 June, 2019 15:21, Donald Shepherd < >> donald.sheph...@gmail.c

Re: [sqlite] [SPAM?] Re: [EXTERNAL] Re: Should SQLite distinguish between +0.0 and -0.0 on output?

2019-06-13 Thread Donald Shepherd
On Fri., 14 Jun. 2019, 7:43 am Keith Medcalf, wrote: > On Thursday, 13 June, 2019 15:21, Donald Shepherd < > donald.sheph...@gmail.com> wrote: > > >On Fri, 14 Jun 2019 at 7:11 am, Richard Hipp wrote: > > >> On 6/13/19, Donald Shepherd wrote: > > >>> Given there's been numerous comments to the

Re: [sqlite] [SPAM?] Re: [EXTERNAL] Re: Should SQLite distinguish between +0.0 and -0.0 on output?

2019-06-13 Thread Keith Medcalf
On Thursday, 13 June, 2019 15:21, Donald Shepherd wrote: >On Fri, 14 Jun 2019 at 7:11 am, Richard Hipp wrote: >> On 6/13/19, Donald Shepherd wrote: >>> Given there's been numerous comments to the effect that SQLite >>> now supports -0.0 storing and retrieval other than printing, >>> I'm

Re: [sqlite] [SPAM?] Re: [EXTERNAL] Re: Should SQLite distinguish between +0.0 and -0.0 on output?

2019-06-13 Thread Richard Hipp
On 6/13/19, Donald Shepherd wrote: > > When I reported that testing on 3.8.7.2 stored -0.0 but retrieved 0.0, your > comment on this list was that "SQLite converts integer floating point > values to actual integers for storage (because that takes up less space on > disk) and then converts back to

Re: [sqlite] [SPAM?] Re: [EXTERNAL] Re: Should SQLite distinguish between +0.0 and -0.0 on output?

2019-06-13 Thread Donald Shepherd
On Fri, 14 Jun 2019 at 07:13, Simon Slavin wrote: > On 13 Jun 2019, at 10:01pm, Donald Shepherd > wrote: > > > Given there's been numerous comments to the effect that SQLite now > supports > > -0.0 storing and retrieval other than printing, I'm curious which version > > this was implemented in

Re: [sqlite] [SPAM?] Re: [EXTERNAL] Re: Should SQLite distinguish between +0.0 and -0.0 on output?

2019-06-13 Thread Donald Shepherd
On Fri, 14 Jun 2019 at 7:11 am, Richard Hipp wrote: > On 6/13/19, Donald Shepherd wrote: > > > > Given there's been numerous comments to the effect that SQLite now > supports > > -0.0 storing and retrieval other than printing, I'm curious which version > > this was implemented in as I wouldn't

Re: [sqlite] [SPAM?] Re: [EXTERNAL] Re: Should SQLite distinguish between +0.0 and -0.0 on output?

2019-06-13 Thread Simon Slavin
On 13 Jun 2019, at 10:01pm, Donald Shepherd wrote: > Given there's been numerous comments to the effect that SQLite now supports > -0.0 storing and retrieval other than printing, I'm curious which version > this was implemented in as I wouldn't mind removing my custom code when we > move to a

Re: [sqlite] [SPAM?] Re: [EXTERNAL] Re: Should SQLite distinguish between +0.0 and -0.0 on output?

2019-06-13 Thread Keith Medcalf
On Thursday, 13 June, 2019 15:01, Donald Shepherd wrote: >Given there's been numerous comments to the effect that SQLite now >supports -0.0 storing and retrieval other than printing, I'm curious >which version this was implemented in as I wouldn't mind removing my >custom code when we move to

Re: [sqlite] [SPAM?] Re: [EXTERNAL] Re: Should SQLite distinguish between +0.0 and -0.0 on output?

2019-06-13 Thread Richard Hipp
On 6/13/19, Donald Shepherd wrote: > > Given there's been numerous comments to the effect that SQLite now supports > -0.0 storing and retrieval other than printing, I'm curious which version > this was implemented in as I wouldn't mind removing my custom code when we > move to a SQLite version

Re: [sqlite] [SPAM?] Re: [EXTERNAL] Re: Should SQLite distinguish between +0.0 and -0.0 on output?

2019-06-13 Thread Donald Shepherd
On Fri, 14 Jun 2019 at 3:28 am, Doug wrote: > It occurs to me that if there are sqlite applications today requiring the > functionality of -0.0, they have implemented it so that it works for their > application. Perhaps, they accomplished that by adding a flag bit or by > some other means. > >

Re: [sqlite] [SPAM?] Re: [EXTERNAL] Re: Should SQLite distinguish between +0.0 and -0.0 on output?

2019-06-13 Thread Keith Medcalf
On Thursday, 13 June, 2019 11:28, Doug wrote: >It occurs to me that if there are sqlite applications today requiring >the functionality of -0.0, they have implemented it so that it works >for their application. Perhaps, they accomplished that by adding a >flag bit or by some other means. >So

Re: [sqlite] [SPAM?] Re: [EXTERNAL] Re: Should SQLite distinguish between +0.0 and -0.0 on output?

2019-06-13 Thread Doug
It occurs to me that if there are sqlite applications today requiring the functionality of -0.0, they have implemented it so that it works for their application. Perhaps, they accomplished that by adding a flag bit or by some other means. So if you do nothing about -0.0, you will break no

Re: [sqlite] [SPAM?] Re: [EXTERNAL] Re: Should SQLite distinguish between +0.0 and -0.0 on output?

2019-06-13 Thread James K. Lowden
On Thu, 13 Jun 2019 10:44:52 -0400 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." Sure, because floating point

Re: [sqlite] [SPAM?] Re: [EXTERNAL] Re: Should SQLite distinguish between +0.0 and -0.0 on output?

2019-06-13 Thread Doug Currie
> > 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

Re: [sqlite] [SPAM?] Re: [EXTERNAL] Re: Should SQLite distinguish between +0.0 and -0.0 on output?

2019-06-13 Thread Scott Robison
On Thu, Jun 13, 2019, 8:51 AM R Smith 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

Re: [sqlite] [SPAM?] Re: [EXTERNAL] Re: Should SQLite distinguish between +0.0 and -0.0 on output?

2019-06-13 Thread R Smith
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

Re: [sqlite] [SPAM?] Re: [EXTERNAL] Re: Should SQLite distinguish between +0.0 and -0.0 on output?

2019-06-13 Thread Doug Currie
> > > 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 e

Re: [sqlite] [SPAM?] Re: [EXTERNAL] Re: Should SQLite distinguish between +0.0 and -0.0 on output?

2019-06-13 Thread Richard Damon
On 6/13/19 1:29 AM, Hick Gunter wrote: >> 2. Math. Negative zero is not a mathematical concept. > -0.0 is "too close to distinguish from, but definitely left of true zero", > which may be significant in some context > Except by the rules of IEEE (as I understand them) -0.0 < 0.0 is FALSE, so