Make sure SQLite isn't being compiled with -ffast_math on the the Debian side. That might cause problems.
On 7/3/08, Tom Epperly <[EMAIL PROTECTED]> wrote: > > When I tried reproducing this behavior on a Red Hat box, the 3.5.9 > version gave the expected results, so I guess it is a Debian unstable > specific issue. > > Tom > > Tom Epperly wrote: > > I reported this to Debian here: > > http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=488864 > > It seems like an upstream sqlite3 issue. I downloaded > > http://www.sqlite.org/sqlite-amalgamation-3.5.9.tar.gz > > > > /tmp/sqlite-amalgamation-3.5.9]> ./configure --disable-shared > > /tmp/sqlite-amalgamation-3.5.9]> make > > /tmp/sqlite-amalgamation-3.5.9]>./sqlite3 > > SQLite version 3.5.9 > > Enter ".help" for instructions > > sqlite> select 1.0/1.0; > > 1.0 > > sqlite> select 1.0/2.0; > > 0.5 > > sqlite> select 1.0/3.0; > > > > sqlite> select 1.0/4.0; > > 0.25 > > sqlite> select 1.0/5.0; > > > > sqlite> select 1.0/6.0; > > > > sqlite> select 1.0/7.0; > > > > sqlite> select 1.0/8.0; > > 0.125 > > sqlite> select 1.0/9.0; > > > > sqlite> select 1.0/16.0; > > 0.0625 > > > > It seems that division only works for perfect powers of 2. Older > > versions of sqlite didn't have this behavior: > > > > /tmp/sqlite-amalgamation-3.5.9]>/usr/bin/sqlite > > SQLite version 2.8.17 > > Enter ".help" for instructions > > sqlite> select 1.0/1.0; > > 1 > > sqlite> select 1.0/2.0; > > 0.5 > > sqlite> select 1.0/3.0; > > 0.333333333333333 > > sqlite> select 1.0/4.0; > > 0.25 > > sqlite> select 1.0/5.0; > > 0.2 > > sqlite> select 1.0/6.0; > > 0.166666666666667 > > sqlite> select 1.0/7.0; > > 0.142857142857143 > > sqlite> select 1.0/8.0; > > 0.125 > > sqlite> select 1.0/9.10; > > 0.10989010989011 > > sqlite> select 1.0/16.0; > > 0.0625 > > sqlite> > > > > I have a program that's expecting the SQLite 2.8.17 behavior. Is this > > 3.5.9 behavior considered correct now? > > > > Regards, > > > > Tom > > > > _______________________________________________ > > sqlite-users mailing list > > sqlite-users@sqlite.org > > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > > > > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users