Another cool project: make double.to!string CTFEable

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Wed Dec 16 07:44:45 PST 2015


This has been discussed in the past and at a point Walter was looking 
into it.

Currently std.conv.to applied to double uses snprintf, which is 
obviously non-CTFEable.

There's been recent work (also discussed here) on fast accurate printing 
of floating point values, see library "double-conversion" written in C++ 
and the associated paper 
http://www.cs.tufts.edu/~nr/cs257/archive/florian-loitsch/printf.pdf.

Implementing that in D would be awesome because there are many many 
applications of CTFEing doubles converted to text.


Andrei


More information about the Digitalmars-d mailing list