Re: [sqlite] Bug: rtree2 tests fail due to incorrect format string in rtree.c

2011-03-04 Thread David Gilbert
On Wed, Mar 02, 2011 at sometime, Jay A. Kreibich wrote: > On Tue, Mar 01, 2011 at 03:21:58PM +, David Gilbert scratched on the wall: > > for(jj=0; jj >sqlite3_snprintf(512-nCell,&zCell[nCell]," > > %f",(double)cell.aCoord[jj].f); > > > > That's against 3.7.4 but it looks like it'

Re: [sqlite] Bug: rtree2 tests fail due to incorrect format string in rtree.c

2011-03-03 Thread Pavel Ivanov
I had an impression that for such big number it will be printed in scientific notation. But I guess that's the difference between %g and %f. And it turns out my habit of using %g instead of %f is a very good thing. Thank you very much for the explanation, Jay. Pavel On Thu, Mar 3, 2011 at 12:06

Re: [sqlite] Bug: rtree2 tests fail due to incorrect format string in rtree.c

2011-03-03 Thread Jay A. Kreibich
On Thu, Mar 03, 2011 at 11:06:33AM -0500, Pavel Ivanov scratched on the wall: > > ?A favorite interview question is, given this line and no other > > ?information, how big must buf_size be to never clip the output? > > ?You can assume the default 1.6 precision ("%1.6f"). > > ? ?snprintf( buf, buf_s

Re: [sqlite] Bug: rtree2 tests fail due to incorrect format string in rtree.c

2011-03-03 Thread Pavel Ivanov
>  A favorite interview question is, given this line and no other >  information, how big must buf_size be to never clip the output? >  You can assume the default 1.6 precision ("%1.6f"). >    snprintf( buf, buf_size, "%f", v ); >  The answer?  At least 318 characters. This is very interesting. Ja

Re: [sqlite] Bug: rtree2 tests fail due to incorrect format string in rtree.c

2011-03-02 Thread Jay A. Kreibich
On Tue, Mar 01, 2011 at 03:21:58PM +, David Gilbert scratched on the wall: > for(jj=0; jjsqlite3_snprintf(512-nCell,&zCell[nCell]," > %f",(double)cell.aCoord[jj].f); > > That's against 3.7.4 but it looks like it's the same in the trunk. > > With that change the test suite passes

[sqlite] Bug: rtree2 tests fail due to incorrect format string in rtree.c

2011-03-02 Thread David Gilbert
Hi, I ran the sqlite3 test suite on ARM Linux (Ubuntu) and got a set of failures in the rtree2 set of tests, including the following set: rtree2-rtree_i32.1.3 rtree2-rtree_i32.1.5.0.2 rtree2-rtree_i32.1.5.10.2 rtree2-rtree_i32.1.5.20.2 rtree2-rtree_i32.1.5.30.2 rtree2-rtree_i32.1.5.40.2 rtree2-r