Re: [sqlite] Floating point literals

2019-07-31 Thread Simon Slavin
On 1 Aug 2019, at 12:55am, Keith Medcalf wrote: > Columns declared with no affinity behave as if they had been declared with > BLOB infinity and v/v. Okay, so leaving out the affinity just lets it default to BLOB. That clarifies and simplifies things.

Re: [sqlite] Floating point literals

2019-07-31 Thread Keith Medcalf
On Wednesday, 31 July, 2019 17:29, Simon Slavin wrote: >On 31 Jul 2019, at 11:58pm, Keith Medcalf wrote: >> it depends on the application of affinity. If you are storing the >floating point value in a column that does not have an affinity (ie, >no conversions are performed), then it is

Re: [sqlite] Floating point literals

2019-07-31 Thread Simon Slavin
On 31 Jul 2019, at 11:58pm, Keith Medcalf wrote: > it depends on the application of affinity. If you are storing the floating > point value in a column that does not have an affinity (ie, no conversions > are performed), then it is stored exactly (except for NaN). Application of > affinity

Re: [sqlite] Floating point literals

2019-07-31 Thread Donald Shepherd
>> for row in db.execute('select x from x'): print row > ... > Row(x=None) > Row(x=inf) > Row(x=-inf) > Row(x=0.0) > Row(x=0.0) > > -- > The fact that there's a Highway to Hell but only a Stairway to Heaven says > a lot about anticipated traffic volume. > &

Re: [sqlite] Floating point literals

2019-07-31 Thread Keith Medcalf
=0.0) Row(x=0.0) -- 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 Donald Shepherd >Sent:

Re: [sqlite] Floating point literals

2019-07-31 Thread Donald Shepherd
c volume. > > > >-Original Message- > >From: sqlite-users [mailto:sqlite-users- > >boun...@mailinglists.sqlite.org] On Behalf Of Igor Tandetnik > >Sent: Wednesday, 31 July, 2019 15:34 > >To: sqlite-users@mailinglists.sqlite.org > >Subject: Re: [sqlite]

Re: [sqlite] Floating point literals

2019-07-31 Thread Keith Medcalf
nik >Sent: Wednesday, 31 July, 2019 15:34 >To: sqlite-users@mailinglists.sqlite.org >Subject: Re: [sqlite] Floating point literals > >On 7/31/2019 5:15 PM, Eric Reischer wrote: >> I understand you can *retrieve* a non-quantized value using >sqlite3_column_double(), but I don't see

Re: [sqlite] Floating point literals

2019-07-31 Thread Donald Shepherd
dnesday, 31 July, 2019 15:15 > >To: sqlite-users@mailinglists.sqlite.org > >Subject: [sqlite] Floating point literals > > > >Is there a way to pass binary representations of floating point > >numbers to > >a SQL query? If sqlite's internal representation of floating p

Re: [sqlite] Floating point literals

2019-07-31 Thread Keith Medcalf
t;From: sqlite-users [mailto:sqlite-users- >boun...@mailinglists.sqlite.org] On Behalf Of Eric Reischer >Sent: Wednesday, 31 July, 2019 15:15 >To: sqlite-users@mailinglists.sqlite.org >Subject: [sqlite] Floating point literals > >Is there a way to pass binary representations of

Re: [sqlite] Floating point literals

2019-07-31 Thread Igor Tandetnik
On 7/31/2019 5:15 PM, Eric Reischer wrote: I understand you can *retrieve* a non-quantized value using sqlite3_column_double(), but I don't see a way to set one without having to printf() the floating point value. sqlite3_bind_double Can this be done using sqlite3_bind_* interfaces, or do

Re: [sqlite] Floating point literals

2019-07-31 Thread Simon Slavin
On 31 Jul 2019, at 10:15pm, Eric Reischer wrote: > Is there a way to pass binary representations of floating point numbers to a > SQL query? If sqlite's internal representation of floating point numbers is > 8-byte IEEE doubles, it would be convenient to be able to pass the literal > value

[sqlite] Floating point literals

2019-07-31 Thread Eric Reischer
Is there a way to pass binary representations of floating point numbers to a SQL query? If sqlite's internal representation of floating point numbers is 8-byte IEEE doubles, it would be convenient to be able to pass the literal value of a float or double to the underlying SQL parser without