www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 20951] New: Wrong Decimal Literals Encoding

https://issues.dlang.org/show_bug.cgi?id=20951

          Issue ID: 20951
           Summary: Wrong Decimal Literals Encoding
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: critical
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: ilyayaroshenko gmail.com

Decimal literals are encoded incorrectly.

They literals should be encoded using IEEE (bankers) round-half-to-even rule
like in C, Rust, and others.

Failed tests:

assert(1.448997445238699 == 0x1.72f17f1f49aadp0);
assert(2075e23 == 0xaba3d58a1f1a98p+32);

--
Jun 18