public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/4327] New: printf does not reliably conform to C standard when printing doubles
@ 2007-04-06  0:43 cottrell at wfu dot edu
  2007-04-06  6:15 ` [Bug libc/4327] " drepper at redhat dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: cottrell at wfu dot edu @ 2007-04-06  0:43 UTC (permalink / raw)
  To: glibc-bugs

#include <stdio.h>
int main (void)
{
    double a = 1.0;
    double b = 0.9999999999999999;
    printf("%#12.5g\n", a);
    printf("%#12.5g\n", b);
    return 0;
}

The above produces as output:

      1.0000
     1.00000

According to the C standard it should produce

      1.0000
      1.0000

-- 
           Summary: printf does not reliably conform to C standard when
                    printing doubles
           Product: glibc
           Version: 2.4
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
        AssignedTo: drepper at redhat dot com
        ReportedBy: cottrell at wfu dot edu
                CC: glibc-bugs at sources dot redhat dot com
 GCC build triplet: i686 GNU/Linux
  GCC host triplet: i686 GNU/Linux
GCC target triplet: i686 GNU/Linux


http://sourceware.org/bugzilla/show_bug.cgi?id=4327

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-11-15 20:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-04-06  0:43 [Bug libc/4327] New: printf does not reliably conform to C standard when printing doubles cottrell at wfu dot edu
2007-04-06  6:15 ` [Bug libc/4327] " drepper at redhat dot com
2007-04-06 17:13 ` cottrell at wfu dot edu
2007-11-15 20:35 ` cagney at redhat dot com
2007-11-15 20:35 ` cagney at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).