3 ms·
That doesn't surprise me, as before floats are involved you need to transform the series into something you can compute (doing this by hand is a good way to und
by aragilar 3y ago
That doesn't surprise me, as before floats are involved you need to transform the series into something you can compute (doing this by hand is a good way to understand what's going on underneath).
https://developers.redhat.com/blog/2015/01/02/improving-math-performance-in-glibc https://developers.redhat.com/blog/2015/01/02/improving-math... gives a basic intro to how these functions are actually implemented, and we can if you compute exp(x) - 1 near 0 that 1 + (small stuff) - 1 is always going to be a problem (it'd be nice if we had a sufficiently smart compiler that could understand how to inline these things, but then it'd probably do surprising things as well).