BUG: printf suppress zeros of a decimal number

Bernhard Reutner-Fischer rep.dot.nop at gmail.com
Tue May 3 15:01:33 UTC 2011


On Mon, May 02, 2011 at 10:07:22PM +0200, Stefani Seibold wrote:
>The following simple test should print 300, but it shows only 3.
>
>#include <stdio.h>
>
>int main(void)
>{
>	printf("%f\n", 300.0);
>	return 0;
>}
>
>printf eats all following zero's after the last non zero digit.
>
>If have tested it with uClibc 0.9.32-rc3 and the current snapshot.


What arch, toolchain, config are you using?

Works For Me (tm):
$ for i in bug{_glibc,};do echo $i: ; ./$i;done
bug_glibc:
300.000000
bug:
300.000000


More information about the uClibc mailing list