[Issue 5227] X ^^ FP at compile-time

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Mon May 11 02:54:36 PDT 2015


https://issues.dlang.org/show_bug.cgi?id=5227

--- Comment #11 from Iain Buclaw <ibuclaw at gdcproject.org> ---
(In reply to Manu from comment #10)
> (In reply to Iain Buclaw from comment #8)
> > (In reply to Manu from comment #7)
> > > log() works!
> > 
> > I doubt that, CTFE isn't powerful enough yet.
> 
> 
> pragma(msg, log(101.2));
> 
> > 4.6171L
> 

Ah, DMD cheats here - I didn't see neither the INLINE_Y2LX path, nor the fact
that DMD apparently executes the fy2lx instruction at compile time for you.

I wouldn't rely on this behaviour if I were you.

--


More information about the Digitalmars-d-bugs mailing list