[uClibc]floating point and printf

Manuel Novoa III mjn3 at codepoet.org
Wed Jun 18 20:19:41 UTC 2003


On Wed, Jun 18, 2003 at 12:03:09PM -0700, Dallas Foley wrote:
> The decimal point is missing on output of printf.
> 
> printf("%f\n", (float)1.01);
> 
> produces:
> 1010000
> 
> Here's my general setup for the above.
> ARM kernel 2.4.19 with NWFPE math emulation set
> uClibc 0.9.19, here's part of .config
> 	UCLIBC_HAS_FLOATS=y
> 	HAS_FPU=y
> 	DO_C99_MATH=y
> gcc 3.2.3
> 
> 
> Also:
> - uClibc 0.9.15 works fine
> - uClibc 0.9.16 causes a seg fault
> - gcc 2.95.3 and 3.2.1 (make no difference)

I can't reproduce this problem.  I get correct output using the latest
cvs version of uClibc and:

[mjn3 at winder mjn3]$ cat /proc/version 
Linux version 2.4.19-rmk7 (root at winder) (gcc version 2.95.4 20011002
(Debian prerelease)) #9 Sat Mar 22 03:08:52 MST 2003

[mjn3 at winder mjn3]$ /usr/arm-linux-uclibc/usr/bin/gcc --version
gcc-3.3 (GCC) 3.3 (Debian)

The above kernel uses NWFPE math emulation as well.

Manuel


More information about the uClibc mailing list