On 24 Mar 2012, at 7:18am, Stephan Buchert <stephanb...@gmail.com> 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
> inserted into the database with a C porgram, in a loop with the
> sqlite3_bind_double function. The date are retrieved in a loop with the
> sqlite3_column_double function. It turns out that SQLITE has quietly turned
> our invalid data (NaNs) into valid 0.0 values! Is this a bug?

Instead of using NaN can you use NULL to mark such values ?  That should work 
perfectly.

Handling of NaN is not always what you might expect.  I await an expert to 
clarify whether it should or shouldn't work.

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

Reply via email to