The following code should print "18014398509481983.0" but it prints "36028797018963967.0" instead .
long double a = 18014398509481984.0; long double b = -1.0; long double c = a + b; printf("%.1Lf\n", c); I used "gcc -v -save-temps -Wall main.c" -- Summary: printf does not print some long doubles correctly Product: gcc Version: 4.0.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: kmmertes at gmail dot com GCC build triplet: powerpc-apple-darwin8 GCC host triplet: powerpc-apple-darwin8 GCC target triplet: powerpc-apple-darwin8 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45205