[Issue 20953] New: Unexpected CTFE double literals behavior
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Jun 18 15:17:47 UTC 2020
https://issues.dlang.org/show_bug.cgi?id=20953
Issue ID: 20953
Summary: Unexpected CTFE double literals behavior
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: critical
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: ilyayaroshenko at gmail.com
The issue description depends on Issue
https://issues.dlang.org/show_bug.cgi?id=20951
Pass:
auto d = 1.448997445238699;
assert(d == 0x1.72f17f1f49aaep+0);
Failed:
assert(1.448997445238699 == 0x1.72f17f1f49aaep+0);
Please note, that for both cases the valid literal value is NOT
0x1.72f17f1f49aaep+0 but 0x1.72f17f1f49aadp+0, see also the Issue 20951.
Probably the last assert uses real to parse the literal, which isn't correct
because it is a double literal.
--
More information about the Digitalmars-d-bugs
mailing list