Implement double precision exp function correctly rounded for all
rounding modes. Using 4 stages:
- Range reduction: reduce to exp(x) = 2^hi * 2^mid1 * 2^mid2 * exp(lo).
- Use 64 + 64 LUT for 2^mid1 and 2^mid2, and use cubic Taylor polynomial to
approximate (exp(lo) - 1) / lo in double precision. Relative error in this
step is bounded by 1.5 * 2^-63.
- If the rounding test fails, use degree-6 Taylor polynomial to approximate
exp(lo) in double-double precision. Relative error in this step is bounded by
2^-99.
- If the rounding test still fails, use degree-7 Taylor polynomial to compute
exp(lo) in ~128-bit precision.