Re: bug in atof

2006-01-22 Thread Uwe Bonnes
> "Louis" == Louis Lenders <[EMAIL PROTECTED]> writes: Louis> Uwe Bonnes elektron.ikp.physik.tu-darmstadt.de> writes: >> > "Peter" == Peter Beutner gmx.net> writes: >> Peter> Uwe Bonnes schrieb: >> >>> "Peter" == Peter Beutner gmx.net> writes: >> >> Pet

Re: bug in atof

2006-01-21 Thread Louis Lenders
Uwe Bonnes elektron.ikp.physik.tu-darmstadt.de> writes: > > > "Peter" == Peter Beutner gmx.net> writes: > > Peter> Uwe Bonnes schrieb: > >>> "Peter" == Peter Beutner gmx.net> writes: > >> > Peter> Which means that '7.8912654773d210' is the same as > Peter> '7.89126

Re: bug in atof

2006-01-21 Thread Tobias Burnus
Hello, Peter Beutner schrieb: > It doesn't parse 'd' or 'D' as exponent. > Seems to be a "MS-only extension" to the standard :p I would guess this comes from Fortran. Real values are printed with "e", those with double precision printed with "d". And as one usually uses double precision in Fortra

Re: bug in atof

2006-01-21 Thread Uwe Bonnes
> "Peter" == Peter Beutner <[EMAIL PROTECTED]> writes: Peter> Uwe Bonnes schrieb: >>> "Peter" == Peter Beutner <[EMAIL PROTECTED]> writes: >> Peter> Which means that '7.8912654773d210' is the same as Peter> '7.8912654773e210'. >> Running the test with native msvcrt

Re: bug in atof

2006-01-21 Thread Peter Beutner
Uwe Bonnes schrieb: >> "Peter" == Peter Beutner <[EMAIL PROTECTED]> writes: > > > Peter> Which means that '7.8912654773d210' is the same as > Peter> '7.8912654773e210'. > > Running the test with native msvcrt doesn't give me 7.8912654773e210 > neither... Using the test that Louis po

Re: bug in atof

2006-01-21 Thread Uwe Bonnes
> "Peter" == Peter Beutner <[EMAIL PROTECTED]> writes: Peter> Which means that '7.8912654773d210' is the same as Peter> '7.8912654773e210'. Running the test with native msvcrt doesn't give me 7.8912654773e210 neither... Peter> But on linux we have(quoted from 'man strtod'):

Re: bug in atof

2006-01-21 Thread Peter Beutner
Uwe Bonnes schrieb: >> "Louis" == Louis Lenders <[EMAIL PROTECTED]> writes: > > Louis> Hi, i filed a bug ( bug 4337) and looks like there's a bug in > Louis> atof. Is there a difference between linux' atof and msvcrt's one? > Louis> Even following simple program (from msdn) yields

Re: bug in atof

2006-01-21 Thread Uwe Bonnes
> "Louis" == Louis Lenders <[EMAIL PROTECTED]> writes: Louis> Hi, i filed a bug ( bug 4337) and looks like there's a bug in Louis> atof. Is there a difference between linux' atof and msvcrt's one? Louis> Even following simple program (from msdn) yields wrong results: Louis> //

bug in atof

2006-01-21 Thread Louis. Lenders
Hi, i filed a bug ( bug 4337) and looks like there's a bug in atof. Is there a difference between linux' atof and msvcrt's one? Even following simple program (from msdn) yields wrong results: // crt_atof.c #include #include int main( void ) { char *s; double x; int i