Problems with printing double-values with printf and sprintf
Sebastian Huber
sebastian.huber at embedded-brains.de
Sat Sep 5 08:13:38 UTC 2009
Ralf Corsepius wrote:
> On 09/04/2009 05:47 PM, Joel Sherrill wrote:
>> 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).
>>>> 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
> I am using
> arm-rtems4.10-gcc -Wp,dD -save-temps -m<cpu> code.c
>
>> Those settings must be right and then ieeefp.h
>> and friends have to interpret that combination
>> correctly.
>> Very likely just a subtle conditional compilation
>> error in newlib.
> This is what I suspect, too.
>
> However, to verify this, the exact compiler call Sebastian is using
> would be necessary.
>
> Ralf
>
>
I use the latest newlib RPM on SuSE 11.1. The header files that cause
the problem are not installed. The target is a ARMv4 architecture with
little endian. The floating-point arithmetic itself is correct.
--
Sebastian Huber, Embedded Brains GmbH
Address : Obere Lagerstr. 30, D-82178 Puchheim, Germany
Phone : +49 89 18 90 80 79-6
Fax : +49 89 18 90 80 79-9
E-Mail : sebastian.huber at embedded-brains.de
PGP : Public key available on request
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
More information about the users
mailing list