https://issues.dlang.org/show_bug.cgi?id=15885
[email protected] changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #3 from [email protected] --- The correct format specifier is ACTUALLY "%.18g", assuming that you want full lossless conversion. This is because: 1) JSON_TYPE.FLOAT is a 64-bit double, not 32-bit float! 2) cast(int)ceil(log(pow(2.0L, F.mant_dig - 1)) / log(10.0L) + 1) decimal digits are needed to represent some floating-point values, such as (1 + F.epsilon). See this DPaste: https://dpaste.dzfl.pl/1bd14e5c3f83#line-25 --
