\frac{e^{x} - e^{-x}}{2}\frac{\frac{1}{3} \cdot {x}^{3} + \left(\frac{1}{60} \cdot {x}^{5} + 2 \cdot x\right)}{2}double code(double x) {
return ((exp(x) - exp(-x)) / 2.0);
}
double code(double x) {
return (((0.3333333333333333 * pow(x, 3.0)) + ((0.016666666666666666 * pow(x, 5.0)) + (2.0 * x))) / 2.0);
}



Bits error versus x
Results
Initial program 58.0
Taylor expanded around 0 0.7
Final simplification0.7
herbie shell --seed 2020092
(FPCore (x)
:name "Hyperbolic sine"
:precision binary64
(/ (- (exp x) (exp (- x))) 2))