\frac{e^{x} - e^{-x}}{2}
\frac{\mathsf{fma}\left(2, x, 0.3333333333333333 \cdot {x}^{3}\right)}{2}
(FPCore (x) :precision binary64 (/ (- (exp x) (exp (- x))) 2.0))
(FPCore (x) :precision binary64 (/ (fma 2.0 x (* 0.3333333333333333 (pow x 3.0))) 2.0))
double code(double x) {
return (exp(x) - exp(-x)) / 2.0;
}
double code(double x) {
return fma(2.0, x, (0.3333333333333333 * pow(x, 3.0))) / 2.0;
}



Bits error versus x
Initial program 58.3
Taylor expanded in x around 0 0.6
Simplified0.6
Final simplification0.6
herbie shell --seed 2022125
(FPCore (x)
:name "Hyperbolic sine"
:precision binary64
(/ (- (exp x) (exp (- x))) 2.0))