https://d.puremagic.com/issues/show_bug.cgi?id=3749
--- Comment #12 from Martin Nowak <[email protected]> 2014-01-07 19:47:17 PST --- (In reply to comment #11) > (In reply to comment #10) > > What's the state of this? > > Having log/exp functions at compile time would be very useful, e.g. to > > pregenerate scientific tables. > > std.math now has pure generic implementations. > > One of the main problems holding CTFE support back is that there is no > straightforward way to do math operations such as isNaN, isInfinity, signbit, > frexp which require access (and for some, manipulation) of the bits in float > types. We had the same issue with hashOf in druntime and now there is a huge machinery to compute exponent and mantissa. Could we allow to read specific floating point values through intrinsics at compile time? Something like exponent(float), signbit(float), mantissa(float)? > Saying that, DMD has a problem that GDC doesn't - it uses the IASM > implementations of std.math functions that can't be evaluated at compile time. How do you treat std.math.log at runtime as intrinsic or does it run the same code? Is there a performance penalty? -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
