How to compute exp(x) for x∈[0,ln(2)] in double precision with high accuracy, possibly at most 0.5 ulp error?
It is possible to obtain low error. After testing a few libraries I have found one with 1 ulp accuracy. However I am not able to find any reference, which delivers precise error bounds for computed value.
Calculating exp(x) is not a trivial task. Althougth is is easy to obtain fast converging polynomial approximating this function, for example the Taylor series, roundoff errors occuring during evaluation of a polynomial are quite high. For example if we want to evaluate a polynomial p(x)=∑N−1i=0aixi, then apriori relative forward error is bounded as
and u is the unit roundoff (half of the machine precision).
Therefore even if we have a polynomial approximation of exp(x) of order 5 (which is hard by itself), with truncation error at most 0.5 ulp, then still roundoff error is at least 5. However 1 ulp error is possible.
My question is what kind of tricks can be used here to obtain high accuracy (without using high precision arithmetics). Is it even possible to obtain 0.5 ulp error?