July 16, 2013 Re: [dmd-internals] Pure CTFE-able std.math | ||||
---|---|---|---|---|
| ||||
Posted in reply to Iain Buclaw | On 15 July 2013 10:46, Iain Buclaw <ibuclaw@ubuntu.com> wrote: > Don, > > I'm in the middle of doing pure real implementations of the elementary math functions in std.math in D for the @safe/pure/nothrow routines that call impure extern(C) mathlib as a fallback if D_InlineAsm is not defined. > This is pretty much complete with the exception of lrint not yet implemented. One thing I've noted running the unittests are that while the functions produce accurate results, this is only true up to 64bit precision. The remaining 16bits bits going slightly off target. eg: exp(1.0L) == E; // true exp(3.0L) == E*E*E; // false -- Iain Buclaw *(p < e ? p++ : p) = (c & 0x0f) + '0'; _______________________________________________ dmd-internals mailing list dmd-internals@puremagic.com http://lists.puremagic.com/mailman/listinfo/dmd-internals |
Copyright © 1999-2021 by the D Language Foundation