On Wed, Mar 02, 2011 at sometime, Jay A. Kreibich wrote:
> On Tue, Mar 01, 2011 at 03:21:58PM +0000, David Gilbert scratched on the wall:

> >      for(jj=0; jj<tree.nDim*2; jj++){
> >        sqlite3_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.  However, that %f looks a bit
> > odd a few lines below and is probably worth thinking about.

>  Due to the way the floating point registers work on a PDP-7, in C all
>  32-bit float values are promoted to 64-bit double values when used
>  in a var-arg.  Hence, for output, "%f" can be safely used for both
>  32-bit and 64-bit floating point values.  The tags "%f" and "%lf" are
>  the same.  (This isn't true for input functions such as scanf().)

Ah yes; and indeed that's what the sqlite's own printf does - always
fetches a double.

Still, the %lld case in my patch does need fixing.

(Note I'm not actually subscribed to the list, so please cc)

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

Reply via email to