Don Clugston wrote: > On 28/06/12 15:31, Jens Mueller wrote: > >Andrei Alexandrescu wrote: > >>On 6/22/12 7:41 AM, Don Clugston wrote: > >>>I think the main thing that's still done in C is the floating point > >>>formatting. > >> > >>Would be great if a contributor could translate FP parsing and > >>formatting code into D. Then we can use it in CTFE. I need it badly > >>for some function tabulation code. > > > >I think formatting cannot be done such that it is CTFE-able. I tried > >implementing a less-inefficient version. As far as I can tell at some > >point you need to extract the significand and the exponent. This is done > >by some "unsafe" cast which is not allowed in CTFE. I don't know a way > >to do it in CTFE-compatible way. > > > >Jens > > Yeah, I think I will have to find a way of allowing it. But it's > difficult to see a clean way of doing it.
Good luck! I'm looking forward to your solution. Jens