Problems with printing double-values with printf and sprintf

Ralf Corsepius ralf.corsepius at rtems.org
Fri Sep 4 15:43:17 UTC 2009


On 09/04/2009 04:50 PM, Sebastian Huber wrote:
> The calculation in dtoa.c line 295 is wrong because the values for Exp_shift1
> and Exp_mask are invalid for the little endian ARM (this is only a good guess
> at the moment).
OK, something to investigate.

But, I guess you know that the arm is very special wrt. float formats?
c.f. the arm-clause in newlib/libc/include/machine/ieeefp.h

Could it be yours is one of the "special kind"?

>    Exp_shift1 has the value 20 and should have the value 23.
> These values are defined in
>
> ./newlib/libc/stdio/vfieeefp.h
> ./newlib/libc/stdlib/mprec.h
>
> It looks like the __IEEE_LITTLE_ENDIAN is undefined.
>    
Code example with corresponding compiler call, please.

Ralf





More information about the users mailing list