[Issue 3749] cannot evaluate yl2x (log) and exp functions at compile time

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Jan 8 04:37:38 PST 2014


https://d.puremagic.com/issues/show_bug.cgi?id=3749



--- Comment #14 from Iain Buclaw <ibuclaw at ubuntu.com> 2014-01-08 04:37:37 PST ---
(In reply to comment #13)
> (In reply to comment #12)
> > (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.

I don't honestly know what to say about that.  I've not tested it and I'm
anticipating it to simply not work in GDC.

> > Could we allow to read specific floating point values through intrinsics at
> > compile time?
> > Something like exponent(float), signbit(float), mantissa(float)?
> > 
> 

Something like this was suggested and discarded IIRC.  I'm not sure how I would
be able to do this from within GCC's infrastructure - or at least return
meaningful / usable data in the case of exponent and mantissa bits. :)

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list