\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}
t_1 := 2 \cdot \frac{x}{-1 + x}\\
t_2 := t \cdot \sqrt{2}\\
\mathbf{if}\;t \leq -1.505980537706646 \cdot 10^{+59}:\\
\;\;\;\;\frac{t_2}{-t \cdot \sqrt{2 \cdot \frac{1}{-1 + x} + t_1}}\\
\mathbf{else}:\\
\;\;\;\;\begin{array}{l}
t_3 := \frac{t_2}{\sqrt{\mathsf{fma}\left(4, \frac{t \cdot t}{x}, 2 \cdot \left(t \cdot t + \frac{\ell \cdot \ell}{x}\right)\right)}}\\
\mathbf{if}\;t \leq -1.1374664350483335 \cdot 10^{-170}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq -2.8022286549987483 \cdot 10^{-273}:\\
\;\;\;\;\begin{array}{l}
t_4 := 2 + \left(\frac{4}{x} + \left(\frac{4}{{x}^{3}} + \frac{4}{x \cdot x}\right)\right)\\
t_5 := \sqrt{\frac{1}{t_4}}\\
\frac{t_2}{-\mathsf{fma}\left(\frac{\ell \cdot \ell}{t \cdot \left(x \cdot x\right)}, t_5, \mathsf{fma}\left(t, \sqrt{t_4}, t_5 \cdot \left(\frac{\ell \cdot \ell}{t \cdot {x}^{3}} + \frac{\ell \cdot \ell}{t \cdot x}\right)\right)\right)}
\end{array}\\
\mathbf{elif}\;t \leq 1.4755055794994423 \cdot 10^{+54}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;\frac{t_2}{t \cdot \sqrt{t_1 + \frac{2}{-1 + x}}}\\
\end{array}\\
\end{array}
(FPCore (x l t) :precision binary64 (/ (* (sqrt 2.0) t) (sqrt (- (* (/ (+ x 1.0) (- x 1.0)) (+ (* l l) (* 2.0 (* t t)))) (* l l)))))
(FPCore (x l t)
:precision binary64
(let* ((t_1 (* 2.0 (/ x (+ -1.0 x)))) (t_2 (* t (sqrt 2.0))))
(if (<= t -1.505980537706646e+59)
(/ t_2 (- (* t (sqrt (+ (* 2.0 (/ 1.0 (+ -1.0 x))) t_1)))))
(let* ((t_3
(/
t_2
(sqrt
(fma 4.0 (/ (* t t) x) (* 2.0 (+ (* t t) (/ (* l l) x))))))))
(if (<= t -1.1374664350483335e-170)
t_3
(if (<= t -2.8022286549987483e-273)
(let* ((t_4
(+
2.0
(+ (/ 4.0 x) (+ (/ 4.0 (pow x 3.0)) (/ 4.0 (* x x))))))
(t_5 (sqrt (/ 1.0 t_4))))
(/
t_2
(-
(fma
(/ (* l l) (* t (* x x)))
t_5
(fma
t
(sqrt t_4)
(*
t_5
(+ (/ (* l l) (* t (pow x 3.0))) (/ (* l l) (* t x)))))))))
(if (<= t 1.4755055794994423e+54)
t_3
(/ t_2 (* t (sqrt (+ t_1 (/ 2.0 (+ -1.0 x)))))))))))))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 t_1 = 2.0 * (x / (-1.0 + x));
double t_2 = t * sqrt(2.0);
double tmp;
if (t <= -1.505980537706646e+59) {
tmp = t_2 / -(t * sqrt((2.0 * (1.0 / (-1.0 + x))) + t_1));
} else {
double t_3 = t_2 / sqrt(fma(4.0, ((t * t) / x), (2.0 * ((t * t) + ((l * l) / x)))));
double tmp_1;
if (t <= -1.1374664350483335e-170) {
tmp_1 = t_3;
} else if (t <= -2.8022286549987483e-273) {
double t_4 = 2.0 + ((4.0 / x) + ((4.0 / pow(x, 3.0)) + (4.0 / (x * x))));
double t_5 = sqrt(1.0 / t_4);
tmp_1 = t_2 / -fma(((l * l) / (t * (x * x))), t_5, fma(t, sqrt(t_4), (t_5 * (((l * l) / (t * pow(x, 3.0))) + ((l * l) / (t * x))))));
} else if (t <= 1.4755055794994423e+54) {
tmp_1 = t_3;
} else {
tmp_1 = t_2 / (t * sqrt(t_1 + (2.0 / (-1.0 + x))));
}
tmp = tmp_1;
}
return tmp;
}



Bits error versus x



Bits error versus l



Bits error versus t
if t < -1.505980537706646e59Initial program 45.1
Simplified45.1
Taylor expanded in t around -inf 3.3
if -1.505980537706646e59 < t < -1.1374664350483335e-170 or -2.80222865499874831e-273 < t < 1.4755055794994423e54Initial program 37.7
Simplified37.7
Taylor expanded in x around inf 16.1
Simplified16.1
if -1.1374664350483335e-170 < t < -2.80222865499874831e-273Initial program 63.0
Simplified63.0
Taylor expanded in x around inf 40.7
Simplified40.7
Taylor expanded in t around -inf 30.8
Simplified30.8
if 1.4755055794994423e54 < t Initial program 45.4
Simplified45.4
Taylor expanded in t around inf 3.9
Simplified3.9
Final simplification11.0
herbie shell --seed 2021329
(FPCore (x l t)
:name "Toniolo and Linder, Equation (7)"
:precision binary64
(/ (* (sqrt 2.0) t) (sqrt (- (* (/ (+ x 1.0) (- x 1.0)) (+ (* l l) (* 2.0 (* t t)))) (* l l)))))