Problems with printing double-values with printf and sprintf
joel.sherrill at OARcorp.com
Fri Sep 4 15:47:39 UTC 2009
Ralf Corsepius wrote:
> 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
>> It looks like the __IEEE_LITTLE_ENDIAN is undefined.
> Code example with corresponding compiler call, please.
Just so it ends up in the email archives. On IRC, I
asked him to check the cpp predefines when
his CPU model is selected.
arm-rtems4.10-gcc -dM -E -mXXX - </dev/null
Those settings must be right and then ieeefp.h
and friends have to interpret that combination
Very likely just a subtle conditional compilation
error in newlib.
> rtems-users mailing list
> rtems-users at rtems.org
Joel Sherrill, Ph.D. Director of Research & Development
joel.sherrill at OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985
More information about the users