https://issues.dlang.org/show_bug.cgi?id=17185
Issue ID: 17185
Summary: Error: number '0x0.0123p-1022' is not representable
Product: D
Version: D2
Hardware: x86
OS: Linux
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
I had a line of code including `double(0x0.0123p-1022)` which compiled fine on
Windows 7 and OSX; note that 0x0.0123p-1022 is representable as a subnormal
double. When compiling on linux with dmd v2.073.0 I received a compile error
"Error: number '0x0.0123p-1022' is not representable" - which is not correct,
because it is representable as a subnormal.
It is possible to write `double(0x0.0123p-1022L)` instead as a workaround.
Parsing subnormal reals e.g. 0x0.0123p-16382L seems to work fine on all three
platforms.
--