\sqrt{\frac{e^{2 \cdot x} - 1}{e^{x} - 1}}\begin{array}{l}
\mathbf{if}\;x \le -7.2860582498663688 \cdot 10^{-16}:\\
\;\;\;\;\sqrt{\frac{e^{2 \cdot x} - 1}{\mathsf{fma}\left(-1, 1, e^{x + x}\right)} \cdot \left(e^{x} + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \frac{x}{\sqrt{2}} + \left(\sqrt{2} + \frac{{x}^{2}}{\sqrt{2}} \cdot \left(0.25 - \frac{0.125}{2}\right)\right)\\
\end{array}double code(double x) {
return sqrt(((exp((2.0 * x)) - 1.0) / (exp(x) - 1.0)));
}
double code(double x) {
double VAR;
if ((x <= -7.286058249866369e-16)) {
VAR = sqrt((((exp((2.0 * x)) - 1.0) / fma(-1.0, 1.0, exp((x + x)))) * (exp(x) + 1.0)));
} else {
VAR = ((0.5 * (x / sqrt(2.0))) + (sqrt(2.0) + ((pow(x, 2.0) / sqrt(2.0)) * (0.25 - (0.125 / 2.0)))));
}
return VAR;
}



Bits error versus x
Results
if x < -7.286058249866369e-16Initial program 0.8
rmApplied flip--0.5
Applied associate-/r/0.5
Simplified0.0
if -7.286058249866369e-16 < x Initial program 38.9
Taylor expanded around 0 7.6
Simplified7.6
Final simplification0.8
herbie shell --seed 2020103 +o rules:numerics
(FPCore (x)
:name "sqrtexp (problem 3.4.4)"
:precision binary64
(sqrt (/ (- (exp (* 2 x)) 1) (- (exp x) 1))))