\sqrt{\frac{e^{2 \cdot x} - 1}{e^{x} - 1}}\begin{array}{l}
\mathbf{if}\;x \le -1.328422371476003 \cdot 10^{-5}:\\
\;\;\;\;\sqrt{\frac{\left(\sqrt{e^{2 \cdot x}} + \sqrt{1}\right) \cdot \sqrt[3]{{\left(\sqrt{e^{2 \cdot x}} - \sqrt{1}\right)}^{3}}}{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 VAR;
if ((x <= -1.328422371476003e-05)) {
VAR = sqrt((((sqrt(exp((2.0 * x))) + sqrt(1.0)) * cbrt(pow((sqrt(exp((2.0 * x))) - sqrt(1.0)), 3.0))) / (exp(x) - 1.0)));
} else {
VAR = sqrt(((x * (1.0 + (0.5 * x))) + 2.0));
}
return VAR;
}



Bits error versus x
Results
if x < -1.328422371476003e-05Initial program 0.1
rmApplied add-sqr-sqrt0.1
Applied add-sqr-sqrt0.1
Applied difference-of-squares0.0
rmApplied add-cbrt-cube0.0
Simplified0.0
if -1.328422371476003e-05 < x Initial program 32.9
Taylor expanded around 0 6.7
Simplified6.7
Final simplification0.9
herbie shell --seed 2020100
(FPCore (x)
:name "sqrtexp (problem 3.4.4)"
:precision binary64
(sqrt (/ (- (exp (* 2 x)) 1) (- (exp x) 1))))