newCTFE Status November 2018

Stefan Koch uplink.coder at
Sat Dec 8 07:08:54 UTC 2018

On Saturday, 8 December 2018 at 04:06:11 UTC, Joakim wrote:
> On Saturday, 8 December 2018 at 00:32:58 UTC, Stefan Koch wrote:
>> Hi All,
>> I have short but good news, non-default class-constructors 
>> work now.
>> (this was tricky because of my unorthodox vtbl layout).
>> And another exciting news item, newCTFE is going to support 
>> cross-platform floating-point as soon as I got around to 
>> re-implementing, the qemu fork of softfloat-2.
> What do you mean by "cross-platform floating-point," using the 
> same implementation everywhere without calling _any_ libc/arch 
> intrinsics?

Yes that is what I mean. It has always been the plan, but until 
I saw no way to actually realize it.

>> That'll result in a compile-time testable floating point 
>> implementation ;) Pretty cool, huh.
> How does that differ from the current implementation?

Currently it relies on the host fpu.  or rather the hosts float 
Which I intent to replace with a pure software solution, which 
operates independently
from the host float math.
And can therefore be made to behave like the targets (more or 
less, it's emulation).

> Btw, do you know some way to get the current compile-time 
> real's precision in D code?

this _may_ work:
static immutable ctRealPerc = () { return real.mant_dig; } ();

More information about the Digitalmars-d mailing list