\sqrt{\frac{e^{2 \cdot x} - 1}{e^{x} - 1}}\begin{array}{l}
\mathbf{if}\;x \le -1.2337766313196286 \cdot 10^{-5}:\\
\;\;\;\;\sqrt{\frac{\sqrt{e^{2 \cdot x}} + \sqrt{1}}{1}} \cdot \sqrt{\frac{\sqrt{e^{2 \cdot x}} - \sqrt{1}}{e^{x} - 1}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{x \cdot \left(1 + 0.5 \cdot x\right) + 2}\\
\end{array}double code(double x) {
return sqrt(((exp((2.0 * x)) - 1.0) / (exp(x) - 1.0)));
}
double code(double x) {
double temp;
if ((x <= -1.2337766313196286e-05)) {
temp = (sqrt(((sqrt(exp((2.0 * x))) + sqrt(1.0)) / 1.0)) * sqrt(((sqrt(exp((2.0 * x))) - sqrt(1.0)) / (exp(x) - 1.0))));
} else {
temp = sqrt(((x * (1.0 + (0.5 * x))) + 2.0));
}
return temp;
}



Bits error versus x
Results
if x < -1.2337766313196286e-05Initial program 0.1
rmApplied *-un-lft-identity0.1
Applied add-sqr-sqrt0.1
Applied add-sqr-sqrt0.1
Applied difference-of-squares0.0
Applied times-frac0.0
Applied sqrt-prod0.0
if -1.2337766313196286e-05 < x Initial program 33.5
Taylor expanded around 0 6.4
Simplified6.4
Final simplification0.8
herbie shell --seed 2020053
(FPCore (x)
:name "sqrtexp (problem 3.4.4)"
:precision binary64
(sqrt (/ (- (exp (* 2 x)) 1) (- (exp x) 1))))