\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}\begin{array}{l}
\mathbf{if}\;t \le -1.36333634917428054 \cdot 10^{40}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{2 \cdot \frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}} - \left(2 \cdot \frac{t}{\sqrt{2} \cdot x} + t \cdot \sqrt{2}\right)}\\
\mathbf{elif}\;t \le 1.114036146905287 \cdot 10^{111}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \left({t}^{2} + \ell \cdot \frac{\ell}{x}\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{2 \cdot \left(\frac{t}{\sqrt{2} \cdot {x}^{2}} + \frac{t}{\sqrt{2} \cdot x}\right) + \left(\sqrt{2} \cdot t - 2 \cdot \frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}}\right)}\\
\end{array}double code(double x, double l, double t) {
return ((sqrt(2.0) * t) / sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l))));
}
double code(double x, double l, double t) {
double VAR;
if ((t <= -1.3633363491742805e+40)) {
VAR = ((sqrt(2.0) * t) / ((2.0 * (t / (pow(sqrt(2.0), 3.0) * pow(x, 2.0)))) - ((2.0 * (t / (sqrt(2.0) * x))) + (t * sqrt(2.0)))));
} else {
double VAR_1;
if ((t <= 1.114036146905287e+111)) {
VAR_1 = ((sqrt(2.0) * t) / sqrt(((4.0 * (pow(t, 2.0) / x)) + (2.0 * (pow(t, 2.0) + (l * (l / x)))))));
} else {
VAR_1 = ((sqrt(2.0) * t) / ((2.0 * ((t / (sqrt(2.0) * pow(x, 2.0))) + (t / (sqrt(2.0) * x)))) + ((sqrt(2.0) * t) - (2.0 * (t / (pow(sqrt(2.0), 3.0) * pow(x, 2.0)))))));
}
VAR = VAR_1;
}
return VAR;
}



Bits error versus x



Bits error versus l



Bits error versus t
Results
if t < -1.3633363491742805e+40Initial program 43.2
Taylor expanded around inf 41.3
Simplified41.3
Taylor expanded around -inf 4.1
if -1.3633363491742805e+40 < t < 1.114036146905287e+111Initial program 39.9
Taylor expanded around inf 17.8
Simplified17.8
rmApplied *-un-lft-identity17.8
Applied add-sqr-sqrt41.0
Applied unpow-prod-down41.0
Applied times-frac38.9
Simplified38.9
Simplified13.7
if 1.114036146905287e+111 < t Initial program 51.0
Taylor expanded around inf 2.7
Simplified2.7
Final simplification9.1
herbie shell --seed 2020103
(FPCore (x l t)
:name "Toniolo and Linder, Equation (7)"
:precision binary64
(/ (* (sqrt 2) t) (sqrt (- (* (/ (+ x 1) (- x 1)) (+ (* l l) (* 2 (* t t)))) (* l l)))))