\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 -2.70678176523745981 \cdot 10^{109}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{-\left(t \cdot \sqrt{2} + 2 \cdot \frac{t}{\sqrt{2} \cdot x}\right)}\\
\mathbf{elif}\;t \le 6.4376393902910242 \cdot 10^{-51}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(2, {t}^{2}, \mathsf{fma}\left(2, \frac{{\ell}^{1}}{\frac{x}{\ell}}, 4 \cdot \frac{{t}^{2}}{x}\right)\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(t, \sqrt{2}, 2 \cdot \frac{t}{\sqrt{2} \cdot x}\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 temp;
if ((t <= -2.70678176523746e+109)) {
temp = ((sqrt(2.0) * t) / -((t * sqrt(2.0)) + (2.0 * (t / (sqrt(2.0) * x)))));
} else {
double temp_1;
if ((t <= 6.437639390291024e-51)) {
temp_1 = ((sqrt(2.0) * t) / sqrt(fma(2.0, pow(t, 2.0), fma(2.0, (pow(l, 1.0) / (x / l)), (4.0 * (pow(t, 2.0) / x))))));
} else {
temp_1 = ((sqrt(2.0) * t) / fma(t, sqrt(2.0), (2.0 * (t / (sqrt(2.0) * x)))));
}
temp = temp_1;
}
return temp;
}



Bits error versus x



Bits error versus l



Bits error versus t
Results
if t < -2.70678176523746e+109Initial program 52.2
Taylor expanded around inf 52.3
Simplified52.3
rmApplied sqr-pow52.3
Applied associate-/l*50.6
Simplified50.6
Taylor expanded around -inf 2.8
if -2.70678176523746e+109 < t < 6.437639390291024e-51Initial program 42.7
Taylor expanded around inf 19.7
Simplified19.7
rmApplied sqr-pow19.7
Applied associate-/l*15.7
Simplified15.7
if 6.437639390291024e-51 < t Initial program 39.7
Taylor expanded around inf 35.2
Simplified35.2
Taylor expanded around inf 6.3
Simplified6.3
Final simplification10.0
herbie shell --seed 2020049 +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)))))