\sqrt{\frac{e^{2 \cdot x} - 1}{e^{x} - 1}}\begin{array}{l}
\mathbf{if}\;x \le -2.2162383544769925 \cdot 10^{-4}:\\
\;\;\;\;\sqrt{\frac{\left(\sqrt{e^{2 \cdot x}} + \sqrt{1}\right) \cdot \left(\sqrt{e^{2 \cdot x}} - \sqrt{1}\right)}{\sqrt[3]{{\left(e^{x} - 1\right)}^{3}}}}\\
\mathbf{elif}\;x \le 6.561572677279099 \cdot 10^{-15}:\\
\;\;\;\;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)\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{\left(\sqrt{e^{2 \cdot x}} + \sqrt{1}\right) \cdot \left(\sqrt{e^{2 \cdot x}} - \sqrt{1}\right)}{e^{x} - 1}}\\
\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 <= -0.00022162383544769925)) {
VAR = sqrt((((sqrt(exp((2.0 * x))) + sqrt(1.0)) * (sqrt(exp((2.0 * x))) - sqrt(1.0))) / cbrt(pow((exp(x) - 1.0), 3.0))));
} else {
double VAR_1;
if ((x <= 6.561572677279099e-15)) {
VAR_1 = ((0.5 * (x / sqrt(2.0))) + (sqrt(2.0) + ((pow(x, 2.0) / sqrt(2.0)) * (0.25 - (0.125 / 2.0)))));
} else {
VAR_1 = sqrt((((sqrt(exp((2.0 * x))) + sqrt(1.0)) * (sqrt(exp((2.0 * x))) - sqrt(1.0))) / (exp(x) - 1.0)));
}
VAR = VAR_1;
}
return VAR;
}



Bits error versus x
Results
if x < -0.00022162383544769925Initial program 0.0
rmApplied add-sqr-sqrt0.0
Applied add-sqr-sqrt0.0
Applied difference-of-squares0.0
rmApplied add-cbrt-cube0.0
Simplified0.0
if -0.00022162383544769925 < x < 6.561572677279099e-15Initial program 45.8
Taylor expanded around 0 0.4
Simplified0.4
if 6.561572677279099e-15 < x Initial program 15.0
rmApplied add-sqr-sqrt15.0
Applied add-sqr-sqrt13.4
Applied difference-of-squares5.5
Final simplification0.3
herbie shell --seed 2020091
(FPCore (x)
:name "sqrtexp (problem 3.4.4)"
:precision binary64
(sqrt (/ (- (exp (* 2 x)) 1) (- (exp x) 1))))