Raw binary(to work without OS) in D

Jens Mueller jens.k.mueller at gmx.de
Thu Jun 28 06:31:36 PDT 2012


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


More information about the Digitalmars-d mailing list