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



Bits error versus x
Results
Initial program Error: 58.0 bits
Taylor expanded around 0 Error: 0.6 bits
SimplifiedError: 0.6 bits
Final simplificationError: 0.6 bits
herbie shell --seed 2020200
(FPCore (x)
:name "Hyperbolic sine"
:precision binary64
(/ (- (exp x) (exp (- x))) 2.0))