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

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Mon May 11 03:09:57 PDT 2015


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

--- Comment #12 from Manu <turkeyman at gmail.com> ---
(In reply to Iain Buclaw from comment #11)
> (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.

That's worrying.
Either way, this is the most basic non-linear maths. We really really do need
this accessible in CTFE. Especially considering x^^y is an operator!

--


More information about the Digitalmars-d-bugs mailing list