On 27 Mar 2012, at 3:42am, "Jay A. Kreibich" wrote:
> On Tue, Mar 27, 2012 at 03:30:03AM +0100, Simon Slavin scratched on the wall:
>>
>> On 27 Mar 2012, at 3:12am, Jay A. Kreibich wrote:
>>
>>> On Sun, Mar 25, 2012 at 05:48:01AM +0100, Simon Slavin scratched
Francis J. Monari, Esquire wrote:
> All,
>
> How are +infinity and -infinity handled?
>
> Frank.
Don't forget signed zero, signaling and quiet NaN.
Here is a short c++ programs to show how +infinity, -infinity
zero, -zero, quiet NaN, signaling NaN are internally
On Mon, Mar 26, 2012 at 9:42 PM, Jay A. Kreibich wrote:
> On Tue, Mar 27, 2012 at 03:30:03AM +0100, Simon Slavin scratched on the wall:
> Not do drag things out, but how would you "handle" a NaN? If someone
> writes a signaling-NaN into the database, the DB will start to throw
On Tue, Mar 27, 2012 at 03:30:03AM +0100, Simon Slavin scratched on the wall:
>
> On 27 Mar 2012, at 3:12am, Jay A. Kreibich wrote:
>
> > On Sun, Mar 25, 2012 at 05:48:01AM +0100, Simon Slavin scratched on the
> > wall:
> >
> >> Can those values be passed from a 'double' C
On 27 Mar 2012, at 3:12am, Jay A. Kreibich wrote:
> On Sun, Mar 25, 2012 at 05:48:01AM +0100, Simon Slavin scratched on the wall:
>
>> Can those values be passed from a 'double' C variable ? I believe so.
>> So I see no reason why SQLite shouldn't be storing them.
>
> If, in
On Sun, Mar 25, 2012 at 05:48:01AM +0100, Simon Slavin scratched on the wall:
> On 25 Mar 2012, at 3:48am, "Jay A. Kreibich" wrote:
> > On Sat, Mar 24, 2012 at 07:32:32AM -0400, Richard Hipp scratched on the
> > wall:
> >
> >> SQLite converts NaN inputs into NULL.
> >
> > I
On 26 Mar 2012, at 4:58pm, Pavel Ivanov wrote:
> SQLite version 3.7.5
> Enter ".help" for instructions
> Enter SQL statements terminated with a ";"
> sqlite> create table t (n);
> sqlite> insert into t values (1e305 * 1e305);
> sqlite> insert into t values (-1e305 * 1e305);
> Storing +infinity, for example. It seems that in IEEE terms +infinity is
> different from NaN, but SQLite return NULL in both instances.
This is apparently some problem with your test setup.
SQLite version 3.7.5
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite>
On 26 Mar 2012, at 3:37pm, "Francis J. Monari, Esquire"
wrote:
> Storing +infinity, for example. It seems that in IEEE terms +infinity is
> different from NaN, but SQLite return NULL in both instances.
Oh dear. Where is the conversion happening ? Is the value stored
All,
Storing +infinity, for example. It seems that in IEEE terms +infinity
is different from NaN, but SQLite return NULL in both instances.
Is there a standard "SQLite" style of handling this situation?
Frank.
Francis J. Monari, Esquire
McKernan, McKernan & Godino
113 North Sixth Street
On Sun, Mar 25, 2012 at 02:03:44PM -0400, Francis J. Monari, Esquire scratched
on the wall:
> All,
>
> Not to sound critical, but to be clear: using SQLite for IEEE
> floating point will result in data "loss' unless precautions are
> taken.
Define "loss". SQLite, in general, is dependent on
All,
Not to sound critical, but to be clear: using SQLite for IEEE floating
point will result in data "loss' unless precautions are taken.
Assuming my statement above is correct, then does a standard set of
precautions exist?
Frank.
Francis J. Monari, Esquire
McKernan, McKernan & Godino
On Sun, Mar 25, 2012 at 09:29:58AM -0400, Francis J. Monari, Esquire scratched
on the wall:
> How are +infinity and -infinity handled?
Generally, they are treated like normal values. You can calculate,
store, and retrieve an INF or -INF value using just SQL expressions.
As with all
All,
How are +infinity and -infinity handled?
Frank.
Simon Slavin wrote:
On 25 Mar 2012, at 3:48am, "Jay A. Kreibich" wrote:
On Sat, Mar 24, 2012 at 07:32:32AM -0400, Richard Hipp scratched on the wall:
SQLite converts NaN inputs into NULL.
I think this is the right
Thanks for all the answers. The solution to check first the type with
sqlite3_column_type() and, if NULL, return NaN seems the most practicable
one from a user's standpoint. A future sqlite3_column_double_v2() or
another way to control the conversion of non-numeric values to double would
be nice
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 24/03/12 21:48, Simon Slavin wrote:
> But it's not what the docs say:
NaN support changed in SQLite 3.5.9 (May 2008):
http://www.sqlite.org/changes.html#version_3_5_9
However cvstrac no longer shows code so I couldn't work out if NaN was
On 25 Mar 2012, at 3:48am, "Jay A. Kreibich" wrote:
> On Sat, Mar 24, 2012 at 07:32:32AM -0400, Richard Hipp scratched on the wall:
>
>> SQLite converts NaN inputs into NULL.
>
> I think this is the right choice. It is what I would expect.
But it's not what the docs say:
On Sat, Mar 24, 2012 at 07:32:32AM -0400, Richard Hipp scratched on the wall:
> SQLite converts NaN inputs into NULL.
I think this is the right choice. It is what I would expect.
Well, no... what I would actually expect is that
sqlite3_bind_double() should return an error, since it was
Stephan,
> Occasionally the sensor has a fault or the values are invalid (like
> negative temperatures). To mark them once and for all as invalid, the
> faulty values are replaced (in a C environment) by NaNs. Then the
data are
> inserted into the database with a C porgram, in a loop with the
On Sat, Mar 24, 2012 at 3:18 AM, Stephan Buchert wrote:
> Here the simplified scenario:
>
> We have measurements from a sensor array. The data are checked and plotted.
> Then they are inserted into an SQLITE database. We find out that after
> retrieving (selecting) the data
On 24 Mar 2012, at 7:18am, Stephan Buchert wrote:
> Occasionally the sensor has a fault or the values are invalid (like
> negative temperatures). To mark them once and for all as invalid, the
> faulty values are replaced (in a C environment) by NaNs. Then the data are
>
Here the simplified scenario:
We have measurements from a sensor array. The data are checked and plotted.
Then they are inserted into an SQLITE database. We find out that after
retrieving (selecting) the data back from the database, the plots look
different, the data have been changed! First we
Last night I upgraded from SQLite 3.3.6 to SQLite 3.4.0. This morning a
transaction in my application failed because SQLite detected that the
application was trying to insert a row with a NULL in a REAL NOT NULL
column. Actually, it turns out that it was a NaN, which SQLite 3.4.0
apparently
23 matches
Mail list logo