This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix strtod for small DBL_DIG


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.

Cheers,
Peter


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]