The following: import std.stdio; const float f = 0.2f; void main() { writeln(f - 0.2); } prints 0, but it should print 2.98023e-09
The introduction of `core.math.toPrec' was made to specifically handle this case, as compile-time floats are stored at full precision.
@WalterBright created dlang/dmd pull request #13613 "fix Issue 22740 - float and double literals should be rounded to thei…" fixing this issue: - fix Issue 22740 - float and double literals should be rounded to their precision https://github.com/dlang/dmd/pull/13613