newCTFE Status November 2018

kinke noone at
Sat Dec 8 15:56:46 UTC 2018

On Saturday, 8 December 2018 at 07:08:54 UTC, Stefan Koch wrote:
> On Saturday, 8 December 2018 at 04:06:11 UTC, Joakim wrote:
>> 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; } ();

Nope, these FP type properties represent the target type's. 
There's just no way of knowing the compile-time precision at the 
moment, at least for LDC (DMD is x86 only and currently always 
uses a x87 `real_t`). For LDC, it's the host `real` precision, 
except for MSVC hosts, where it uses x87 (Rainer's custom 
implementation in dmd.root.longdouble).

More information about the Digitalmars-d mailing list