import std.conv; import std.stdio; void main() { double value = -12.000123456; writeln( value.sizeof ); writeln( value ); writeln( value.to!string() ); writeln( value.to!dstring() ); }
/* 8 -12.0001 -12.0001 -12.0001 */ In Dart, value.toString() returns "-12.000123456". In C#, value.ToString() returns "-12.000123456". In D, value.to!string() returns "-12.0001" :(How can I convert a double value -12.000123456 to its string value "-12.000123456", i.e. without loosing double-precision digits ?