[LLVMbugs] [Bug 1709] New: long double 0.5 prints as 0.500001

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Wed Sep 26 12:20:51 PDT 2007


           Summary: long double 0.5 prints as 0.500001
           Product: new-bugs
           Version: unspecified
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: baldrick at free.fr
                CC: llvmbugs at cs.uiuc.edu

This program compiled with llvm-gcc-4.2 outputs 0.500001, while with
gcc it outputs 0.5.

#include <stdio.h>
int main(void) {
  long double x = 0.5L;
  printf("%Lg\n", x);
  return 0;

Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

More information about the llvm-bugs mailing list