[PATCH] Fix strtod for small DBL_DIG
Mon May 16 13:52:00 GMT 2011
On May 16 15:27, Peter Rosin wrote:
> Den 2011-05-16 14:33 skrev Corinna Vinschen:
> > Thanks for the testcase. However, I can still not reproduce the
> > problem. I tried again with float and strtof on Cygwin, but
> > regardless of running it with or without your patch, it results
> > in printing
> > 12.3456789 12.3456789
> > The strtod_r code is plain C so I'd expect that the conversion
> > is target independent. So why would it fail for arm but not for
> > i386?
> Perhaps the reason for that is that in the arm case the double inside
> strtod_r is only 32 bits? Try replacing the local doubles with floats?
> There's also a whole bunch of code conditional on _DOUBLE_IS_32BITS
> to consider.
You have a point there. Ok, I can't test that easily and since it
works fine for sizeof(double)==8 systems, and since Christian has
apparently tested his patch, I checked it in.
Cygwin Project Co-Leader
More information about the Newlib