\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 -9.01412739140910422 \cdot 10^{33}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{-\left(t \cdot \sqrt{2} + 2 \cdot \frac{t}{\sqrt{2} \cdot x}\right)}\\
\mathbf{elif}\;t \le 4.466400235178163 \cdot 10^{111}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(2, {t}^{2}, \mathsf{fma}\left(2, \ell \cdot \frac{\ell}{x}, 4 \cdot \frac{{t}^{2}}{x}\right)\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(2, \frac{t}{\sqrt{2} \cdot {x}^{2}}, \mathsf{fma}\left(2, \frac{t}{\sqrt{2} \cdot x}, t \cdot \sqrt{2}\right) - 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 <= -9.014127391409104e+33)) {
VAR = ((sqrt(2.0) * t) / -((t * sqrt(2.0)) + (2.0 * (t / (sqrt(2.0) * x)))));
} else {
double VAR_1;
if ((t <= 4.466400235178163e+111)) {
VAR_1 = ((sqrt(2.0) * t) / sqrt(fma(2.0, pow(t, 2.0), fma(2.0, (l * (l / x)), (4.0 * (pow(t, 2.0) / x))))));
} else {
VAR_1 = ((sqrt(2.0) * t) / fma(2.0, (t / (sqrt(2.0) * pow(x, 2.0))), (fma(2.0, (t / (sqrt(2.0) * x)), (t * sqrt(2.0))) - (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 < -9.014127391409104e+33Initial program 42.8
Taylor expanded around inf 40.6
Simplified40.6
Taylor expanded around -inf 4.4
if -9.014127391409104e+33 < t < 4.466400235178163e+111Initial program 40.0
Taylor expanded around inf 17.9
Simplified17.9
rmApplied *-un-lft-identity17.9
Applied add-sqr-sqrt41.1
Applied unpow-prod-down41.1
Applied times-frac39.0
Simplified39.0
Simplified13.8
if 4.466400235178163e+111 < t Initial program 51.1
Taylor expanded around inf 2.6
Simplified2.6
Final simplification9.2
herbie shell --seed 2020103 +o rules:numerics
(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)))))