Hi Nuno,

Have tried your suggestion; added __STD_IEC_559 to preprocessor
definitions for the sqlite project in Visual Studio. Same result.

I noted that the preprocessor macro quoted is applicable to C99 and
not C++. So I then tried specifying that Visual Studio compile the
sqlite code as C rather than C++ (it probably was doing that anyway),
but again with the same result.

Rgds,
Simon

On 05/09/07, Nuno Lucas <[EMAIL PROTECTED]> wrote:
> On 9/5/07, Simon Davies <[EMAIL PROTECTED]> wrote:
> [...]
> > in sqlite3VdbeMemStringify.
> > This resolves down to calling a function vxprintf, which has the following 
> > line:
> >
> >    while( realvalue>=10.0 && exp<=350 ){ realvalue *= 0.1; exp++; }
> >
> [...]
> > Interestingly, if the line is changed to
> >    while( realvalue>=10.0 && exp<=350 ){ realvalue /= 10; exp++; }
> > then the accumulated error is less, and the correct value is printed.
> > Of course, this change may break other builds.
> >
> > One wonders why XP/VC++ produces such a large error in its floating
> > point manipulations that appears to be avoided by other compilers.
>
> What about defining __STD_IEC_559 before the compilation?
> Acording to this:
>
>   http://david.tribble.com/text/cdiffs.htm#C99-iec60559
>
> C99 allows one to force the compiler to follow the standard, so maybe
> libc does it by default, but the official sqlite compiled version
> (which IIRC is linked with the old Microsoft C runtime DLL) doesn't.
>
>
> Regards,
> ~Nuno Lucas
>
>
> >
> > Rgds,
> > Simon
>
> -----------------------------------------------------------------------------
> To unsubscribe, send email to [EMAIL PROTECTED]
> -----------------------------------------------------------------------------
>
>

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to