\sqrt{\frac{e^{2 \cdot x} - 1}{e^{x} - 1}}\begin{array}{l}
\mathbf{if}\;x \le -1.11558615421983944 \cdot 10^{-16}:\\
\;\;\;\;\sqrt{\left({\left(\sqrt{e^{2}}\right)}^{\left(\frac{1}{2} \cdot x\right)} \cdot {\left(\sqrt{e^{2}}\right)}^{\left(\frac{1}{2} \cdot x\right)} + \sqrt{1}\right) \cdot \frac{{\left(e^{2}\right)}^{\left(\frac{1}{2} \cdot x\right)} - \sqrt{1}}{e^{x} - 1}}\\
\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 temp;
if ((x <= -1.1155861542198394e-16)) {
temp = sqrt((((pow(sqrt(exp(2.0)), (0.5 * x)) * pow(sqrt(exp(2.0)), (0.5 * x))) + sqrt(1.0)) * ((pow(exp(2.0), (0.5 * x)) - sqrt(1.0)) / (exp(x) - 1.0))));
} else {
temp = ((0.5 * (x / sqrt(2.0))) + (sqrt(2.0) + ((pow(x, 2.0) / sqrt(2.0)) * (0.25 - (0.125 / 2.0)))));
}
return temp;
}



Bits error versus x
Results
if x < -1.1155861542198394e-16Initial program 0.8
rmApplied *-un-lft-identity0.8
Applied add-sqr-sqrt0.8
Applied add-sqr-sqrt0.7
Applied difference-of-squares0.3
Applied times-frac0.3
Simplified0.3
rmApplied add-log-exp0.3
Applied exp-to-pow0.3
Applied sqrt-pow10.0
Simplified0.0
rmApplied add-log-exp0.0
Applied exp-to-pow0.0
Applied sqrt-pow10.0
Simplified0.0
rmApplied add-sqr-sqrt0.0
Applied unpow-prod-down0.0
if -1.1155861542198394e-16 < x Initial program 36.7
Taylor expanded around 0 8.4
Simplified8.4
Final simplification0.8
herbie shell --seed 2020049
(FPCore (x)
:name "sqrtexp (problem 3.4.4)"
:precision binary64
(sqrt (/ (- (exp (* 2 x)) 1) (- (exp x) 1))))