Public bug reported:

Binary package hint: libc6

I used Ubuntu 7.04 on x86 system (Pentium M), and updated the libc
package to version 2.6: (2.6-3ubuntu2). The error described below also
appliled to glibc 2.5, IIRC.

I found that the following C program won't print the correct number of
digits:

#include <stdio.h>
int main(int argc, char *argv[], char *env[])
{
    printf("%#.4g\n", 912.98);
    return 0;
}

The output should be "913.0", but my Ubuntu box shows "913." (no
trailing zero). The alternate format, according to the C standard,
should print out the trailing zeros after decimal point.

This error is shameful and severe! I tried on different systems (Fedora
5, Fedora 6, SunOS, CentOS), none of them show this sickness.

Wirawan

** Affects: glibc (Ubuntu)
     Importance: Undecided
         Status: New

-- 
libc6 printf "alternate format" %#.g prints wrong number of digits
https://bugs.launchpad.net/bugs/128355
You received this bug notification because you are a member of Ubuntu
Bugs, which is the bug contact for Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to