\sqrt{\frac{e^{2 \cdot x} - 1}{e^{x} - 1}}e^{\log \left(\sqrt{1 \cdot \mathsf{fma}\left(\sqrt{e^{x}}, \sqrt{e^{x}}, 1\right)}\right)}double code(double x) {
return sqrt(((exp((2.0 * x)) - 1.0) / (exp(x) - 1.0)));
}
double code(double x) {
return exp(log(sqrt((1.0 * fma(sqrt(exp(x)), sqrt(exp(x)), 1.0)))));
}



Bits error versus x
Results
Initial program 4.7
rmApplied flip--4.2
Applied associate-/r/4.2
Simplified3.0
Taylor expanded around 0 0.0
rmApplied add-sqr-sqrt0.1
Applied fma-def0.0
rmApplied add-exp-log0.1
Final simplification0.1
herbie shell --seed 2020057 +o rules:numerics
(FPCore (x)
:name "sqrtexp (problem 3.4.4)"
:precision binary64
(sqrt (/ (- (exp (* 2 x)) 1) (- (exp x) 1))))