printf float

Raphael Mack rmack at student.ethz.ch
Sat Aug 26 09:54:50 UTC 2006


Hi,

when executing
int main(){
        float x = 3.1415;
        printf("%f\n", x);
        return 0;
}

I get "31415" instead of "3.1415". This looks like a problem with the
locales. Locale support is activated in uClibc.

It is compilied with arm-linux-uclibc-gcc (version 3.4.6) and uclibc
(svnr15528). Toolchain created with buildroot-20060628.

I'm grateful for every hint.

Raphael




More information about the uClibc mailing list