ldc
ldc copied to clipboard
std.conv.to!double wrong in some cases on aarch64
v = "0.6".to!double;
writefln!"%x"(*cast(ulong*)&v);
I think the correct answer is 3fe3333333333333, which is what we get on dmd and ldc on x86_64, but ldc on aarch64 (macos) gives 3fe3333333333334
"1234567.89" & "12.3456789" also showed up in testing as different.
couldn't this be due to some rounding mode difference?
Well maybe... but something is definitely off, because strtod gives the right answer (3fe3333333333333).
The same result is obtained on Windows (tested with LDC v1.31), so if this is a bug, it's almost certainly in Phobos and related to 64-bit real (on AArch64, only for Apple).