https://issues.dlang.org/show_bug.cgi?id=23284
Issue ID: 23284
Summary: Enhance floating point not representable error message
Product: D
Version: D2
Hardware: x86
OS: All
Status: NEW
Severity: enhancement
Priority: P1
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
If a floating point number is not representable in the given type (float/real)
but it is using a higher precision (real/double), the error message should
include the suggestion to change types and use the L suffix.
Currently:
```d
real x = 0x1p-16383; // Error: number `0x1p-16383` is not representable
```
Example output:
```d
real x = 0x1p-16383; // Error: number `0x1p-16383` is not representable using
`real` but can be represented by a `double` by adding the suffix `L`.
```
--