\frac{2}{e^{x} + e^{-x}}\left(\sqrt{\frac{2}{e^{x} + e^{-x}}} \cdot \left(\sqrt[3]{\sqrt{\frac{2}{e^{x} + e^{-x}}}} \cdot \sqrt[3]{\sqrt{\frac{2}{e^{x} + e^{-x}}}}\right)\right) \cdot \sqrt[3]{\sqrt{\frac{2}{e^{x} + e^{-x}}}}double code(double x) {
return (2.0 / (exp(x) + exp(-x)));
}
double code(double x) {
return ((sqrt((2.0 / (exp(x) + exp(-x)))) * (cbrt(sqrt((2.0 / (exp(x) + exp(-x))))) * cbrt(sqrt((2.0 / (exp(x) + exp(-x))))))) * cbrt(sqrt((2.0 / (exp(x) + exp(-x))))));
}



Bits error versus x
Results
Initial program 0.0
rmApplied add-sqr-sqrt0.0
rmApplied add-cube-cbrt0.0
Applied associate-*r*0.0
Final simplification0.0
herbie shell --seed 2020057
(FPCore (x)
:name "Hyperbolic secant"
:precision binary64
(/ 2 (+ (exp x) (exp (- x)))))