[arm-gnu] sprintf issue on Cortex-M3
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[arm-gnu] sprintf issue on Cortex-M3
- To: arm-gnu@xxxxxxxxxxxxxxxx
- Subject: [arm-gnu] sprintf issue on Cortex-M3
- From: Norbert Unterberg <nunterberg@xxxxxxxxx>
- Date: Tue, 15 Dec 2009 14:06:07 +0100
Hi,
we are using arm-none-eabi-gcc (Sourcery G++ Lite 2009q3-68) 4.4.1.
Formatting a floating point number with sprintf does not seem to work:
char b[20];
float temperature = 0.4f;
sprintf(b, "%6.1f ", temperature);
prints " -0.0" into the buffer.
I have searched the mailing list and have found an article from
September 9 ("output of sprintf with double-input"), but I did not
understand the solution posted there.
Is floating point output with sprintf a known issue?
Norbert Unterberg