Etienne <ejlist-sql...@yahoo.fr> wrote:

>>>>> R:\>sqlite NUL "select 99990.1;"
>>>>> 99990.1
>>>>>
>>>>>
>>>>> JSDB (www.jsdb.org) output:
>>>>>
>>>>> js>var db = new SQLite();
>>>>> js>db.exec("select 99990.1", function(r){writeln(r)});
>>>>> 99990.1=99990.1000000001
>>>>> true
>
>> You are not doing the same thing both times.  One time you are writing the 
>> result using SQLite.  The other time you are writing the result using a 
>> 'writeln()' command.  There is no 'writeln()' command in SQLite.
>
> THE PROBLEM OCCURS AT SQLITE LEVEL! The caller does not matter.
>
> Behaviors diverge from sqlite3(071300).c: line 19911 (var "realvalue") very 
> precisely.
>
>
> Regards,
> Etienne

More likely, the printf(...) (or the equivalent function) is done with
different precision in both case.  So it prints the same number
differently.

Anyway, you should not rely on 2 floating points being equal or not.
Floating points should be compared with a small margin.

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

Reply via email to