Re: [sqlite] (shell dependent) library rounding error

2012-06-15 Thread Dominique Pellé
Etienne wrote: > R:\>sqlite NUL "select 0.1;" > 0.1 > > > JSDB (www.jsdb.org) output: > > js>var db = new SQLite(); > js>db.exec("select 0.1", function(r){writeln(r)}); > 0.1=0.11 > true > >> You are not

[sqlite] (shell dependent) library rounding error

2012-06-15 Thread Etienne
> > The problem is: the "real" rounding error depends here on the shell (SQLite > > or JSDB) calling the SQLite library. > Yes. Different languages use different ways to hide the fact that they can't > hide the 0.1. The difference of languages is irrelevant here. Both shells call "SQLITE_API

Re: [sqlite] (shell dependent) library rounding error

2012-06-15 Thread Jay A. Kreibich
On Fri, Jun 15, 2012 at 06:32:51AM +0200, Etienne scratched on the wall: > The problem is: the "real" rounding error depends here on the shell > (SQLite or JSDB) calling the SQLite library. This shouldn't be a surprise. The core SQLite API is expecting a 64-bit binary number. That's what

Re: [sqlite] (shell dependent) library rounding error

2012-06-15 Thread Simon Slavin
On 15 Jun 2012, at 5:32am, Etienne wrote: > That said... the rounding error ITSELF is not the point. > > The problem is: the "real" rounding error depends here on the shell (SQLite > or JSDB) calling the SQLite library. Yes. Different languages use different ways to

[sqlite] (shell dependent) library rounding error

2012-06-14 Thread Etienne
enne - Original message - From: Simon Slavin <slav...@bigfraud.org> To: General Discussion of SQLite Database <sqlite-users@sqlite.org> Subject: Re: [sqlite] (shell dependent) library rounding error Date: Thu, 14 Jun 2012 22:13:18 +0100 On 14 Jun 2012, at 9:30pm, Etienne &l

Re: [sqlite] (shell dependent) library rounding error

2012-06-14 Thread Simon Slavin
On 14 Jun 2012, at 9:30pm, Etienne wrote: > js>var db = new SQLite(); > js>db.exec("select 0.1", function(r){writeln(r)}); > 0.1=0.11 > true There's no way to store the fraction 0.1 as a binary value. Read this:

[sqlite] (shell dependent) library rounding error

2012-06-14 Thread Etienne
Hi all, This is not really a SQLite issue, but the only solution I found out so far consists in modifying SQLite sources. Maybe someone here is able to clarify the following mystery... --- SQLite shell output: R:\>sqlite NUL "select 0.1;" 0.1 JSDB (www.jsdb.org) output: js>var db