ldexp and frexp benchmark between Mir, C and Phobos
Guillaume Piolat
first.last at gmail.com
Tue Jan 1 23:36:55 UTC 2019
On Monday, 31 December 2018 at 13:24:29 UTC, kinke wrote:
> On Sunday, 30 December 2018 at 13:39:44 UTC, Guillaume Piolat
> wrote:
>> Been waiting for an exp() rewrite. And Boost-licensed! I'm
>> using expf() from whatever libc is shipped and the variability
>> of results and lack of control is annoying.
>
> exp != {ld,fr}exp. Phobos includes a proper single/double
> precision exp implementation since v2.082 and is Boost
> licensed...
llvm_exp (defers to C runtime) gives considerable speed
improvement over `std.math.exp`.
I've tested `expf` form the VS runtime exhaustively for 32-bit
`float` and it showed the relative accuracy was within < 0.0002%
of std.math.exp,
It's not concerning at all, what is more is the variability of C
runtime though vs a D function. Looking for speed AND control :)
More information about the Digitalmars-d-announce
mailing list