HomePhabricator

[libc] Add implementation of expm1f.

Authored by lntue on Apr 22 2021, 9:38 PM.

Description

[libc] Add implementation of expm1f.

Use expm1f(x) = exp(x) - 1 for |x| > ln(2).
For |x| <= ln(2), divide it into 3 subintervals: [-ln2, -1/8], [-1/8, 1/8], [1/8, ln2]
and use a degree-6 polynomial approximation generated by Sollya's fpminmax for each interval.
Errors < 1.5 ULPs when we use fma to evaluate the polynomials.

Differential Revision: https://reviews.llvm.org/D101134

Details

Committed
lntueJun 10 2021, 11:58 AM
Differential Revision
D101134: [libc] Add implementation of expm1f.
Parents
rGc0e6f2f43a4c: [mlir-vscode] Fix dependencies to enable packaging the extension properly.
Branches
Unknown
Tags
Unknown