\sqrt{\frac{e^{2 \cdot x} - 1}{e^{x} - 1}}\begin{array}{l}
\mathbf{if}\;x \le -8.6055153790992069 \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}:\\
\;\;\;\;\left(0.25 \cdot \frac{{x}^{2}}{\sqrt{2}} + \left(\sqrt{2} + 0.5 \cdot \frac{x}{\sqrt{2}}\right)\right) - 0.125 \cdot \frac{{x}^{2}}{{\left(\sqrt{2}\right)}^{3}}\\
\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 <= -8.605515379099207e-05)) {
VAR = (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 {
VAR = (((0.25 * (pow(x, 2.0) / sqrt(2.0))) + (sqrt(2.0) + (0.5 * (x / sqrt(2.0))))) - (0.125 * (pow(x, 2.0) / pow(sqrt(2.0), 3.0))));
}
return VAR;
}



Bits error versus x
Results
if x < -8.605515379099207e-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 -8.605515379099207e-05 < x Initial program 35.0
rmApplied flip3--35.4
Applied associate-/r/35.4
Applied sqrt-prod35.4
Taylor expanded around 0 6.3
Final simplification0.8
herbie shell --seed 2020079
(FPCore (x)
:name "sqrtexp (problem 3.4.4)"
:precision binary64
(sqrt (/ (- (exp (* 2 x)) 1) (- (exp x) 1))))