\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.25030144176399973 \cdot 10^{148}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(2, \frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}}, -\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)\right)\right)}\\
\mathbf{elif}\;t \le 5.0574547732255797 \cdot 10^{-35}:\\
\;\;\;\;\frac{\left(\sqrt[3]{\sqrt{2}} \cdot \sqrt[3]{\sqrt{2}}\right) \cdot \left(\sqrt[3]{\sqrt{2}} \cdot t\right)}{\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(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 <= -1.2503014417639997e+148)) {
temp = ((sqrt(2.0) * t) / fma(2.0, (t / (pow(sqrt(2.0), 3.0) * pow(x, 2.0))), -fma(2.0, (t / (sqrt(2.0) * pow(x, 2.0))), fma(2.0, (t / (sqrt(2.0) * x)), (t * sqrt(2.0))))));
} else {
double temp_1;
if ((t <= 5.05745477322558e-35)) {
temp_1 = (((cbrt(sqrt(2.0)) * cbrt(sqrt(2.0))) * (cbrt(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 {
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 < -1.2503014417639997e+148Initial program 60.7
Taylor expanded around -inf 2.5
Simplified2.5
if -1.2503014417639997e+148 < t < 5.05745477322558e-35Initial program 39.6
Taylor expanded around inf 18.9
Simplified18.9
rmApplied *-un-lft-identity18.9
Applied add-sqr-sqrt41.2
Applied unpow-prod-down41.2
Applied times-frac39.0
Simplified39.0
Simplified14.8
rmApplied add-cube-cbrt14.8
Applied associate-*l*14.7
if 5.05745477322558e-35 < t Initial program 40.1
Taylor expanded around inf 36.1
Simplified36.1
Taylor expanded around inf 6.7
Simplified6.7
Final simplification10.3
herbie shell --seed 2020053 +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)))))