On 26 Mar 2012, at 4:58pm, Pavel Ivanov <paiva...@gmail.com> 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);
> sqlite> insert into t values (1/0);
> sqlite> select n, typeof(n) from t;
> Inf|real
> -Inf|real
> |null
> sqlite>

Interesting.

SQLite version 3.7.7 2011-10-10 22:11:44
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> .nullvalue ThisIsANull
sqlite> CREATE TABLE t (pos REAL, neg REAL, nn REAL);
sqlite> INSERT into t VALUES (1, 2, 3);
sqlite> insert into t values ((1e305 * 1e305), (-1e305 * 1e305), 1/0);
sqlite> INSERT INTO t VALUES (Inf,-Inf,NaN);
Error: no such column: Inf
sqlite> SELECT * FROM t;
1.0|2.0|3.0
Inf|-Inf|ThisIsANull
sqlite> SELECT pos+neg FROM t;
3.0
ThisIsANull
sqlite> SELECT pos-neg FROM t;
-1.0
Inf
sqlite> SELECT pos-nn FROM t;
-2.0
ThisIsANull
sqlite> 

Okay, not as bad as I'd feared.  It's handling infinities fine, it's just NaN 
that's a problem.

Simon.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to