[LLVMbugs] [Bug 21203] New: llvm::yaml::ScalarTraits<double> issue

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Oct 8 02:22:51 PDT 2014


http://llvm.org/bugs/show_bug.cgi?id=21203

            Bug ID: 21203
           Summary: llvm::yaml::ScalarTraits<double> issue
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: wmamrak at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

When yamlizing doubles there occurs loss of data due to %g format specifier.
When the precision is not set, it defaults to 6. Thus e.g.:

466075689.817616

is written as:

4.66076e+008

The (obvious) solution is to use %f specifier.

File lib/Support/YAMLTraits.cpp at line 807.

regards

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20141008/0af9d9d4/attachment.html>


More information about the llvm-bugs mailing list