Raw binary(to work without OS) in D

Don Clugston dac at nospam.com
Thu Jun 28 06:50:57 PDT 2012


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.


More information about the Digitalmars-d mailing list