\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 := t \cdot \sqrt{2}\\
t_2 := t \cdot \sqrt{\frac{2}{x - 1} + 2 \cdot \frac{x}{x - 1}}\\
\mathbf{if}\;t \leq -8.498317817530891 \cdot 10^{+35}:\\
\;\;\;\;\frac{t_1}{-t_2}\\
\mathbf{else}:\\
\;\;\;\;\begin{array}{l}
t_3 := \frac{t_1}{\sqrt{\mathsf{fma}\left(4, \frac{t \cdot t}{x \cdot x}, \mathsf{fma}\left(4, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, \frac{\ell}{x} \cdot \frac{\ell}{x}, 2 \cdot \left(t \cdot t + \frac{\ell \cdot \ell}{x}\right)\right)\right)\right)}}\\
\mathbf{if}\;t \leq -3.90766212138674 \cdot 10^{-166}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq -8.964156268883778 \cdot 10^{-292}:\\
\;\;\;\;\begin{array}{l}
t_4 := 2 + \left(4 \cdot \frac{1}{x} + 4 \cdot \frac{1}{{x}^{2}}\right)\\
t_5 := \sqrt{\frac{1}{t_4}}\\
\frac{t_1}{-\left(\frac{{\ell}^{2}}{t \cdot x} \cdot t_5 + \left(t_5 \cdot \frac{{\ell}^{2}}{t \cdot {x}^{2}} + t \cdot \sqrt{t_4}\right)\right)}
\end{array}\\
\mathbf{elif}\;t \leq 3.0437925850526267 \cdot 10^{-168}:\\
\;\;\;\;\begin{array}{l}
t_6 := \sqrt{2} \cdot x\\
\frac{t_1}{\mathsf{fma}\left(t, \sqrt{2}, \mathsf{fma}\left(2, \frac{t}{t_6}, \frac{\ell \cdot \ell}{t \cdot t_6}\right)\right)}
\end{array}\\
\mathbf{elif}\;t \leq 2.001416283313715 \cdot 10^{+49}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;\frac{t_1}{t_2}\\
\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 (* t (sqrt 2.0)))
(t_2 (* t (sqrt (+ (/ 2.0 (- x 1.0)) (* 2.0 (/ x (- x 1.0))))))))
(if (<= t -8.498317817530891e+35)
(/ t_1 (- t_2))
(let* ((t_3
(/
t_1
(sqrt
(fma
4.0
(/ (* t t) (* x x))
(fma
4.0
(/ (* t t) x)
(fma
2.0
(* (/ l x) (/ l x))
(* 2.0 (+ (* t t) (/ (* l l) x))))))))))
(if (<= t -3.90766212138674e-166)
t_3
(if (<= t -8.964156268883778e-292)
(let* ((t_4
(+ 2.0 (+ (* 4.0 (/ 1.0 x)) (* 4.0 (/ 1.0 (pow x 2.0))))))
(t_5 (sqrt (/ 1.0 t_4))))
(/
t_1
(-
(+
(* (/ (pow l 2.0) (* t x)) t_5)
(+
(* t_5 (/ (pow l 2.0) (* t (pow x 2.0))))
(* t (sqrt t_4)))))))
(if (<= t 3.0437925850526267e-168)
(let* ((t_6 (* (sqrt 2.0) x)))
(/
t_1
(fma t (sqrt 2.0) (fma 2.0 (/ t t_6) (/ (* l l) (* t t_6))))))
(if (<= t 2.001416283313715e+49) t_3 (/ t_1 t_2)))))))))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 = t * sqrt(2.0);
double t_2 = t * sqrt((2.0 / (x - 1.0)) + (2.0 * (x / (x - 1.0))));
double tmp;
if (t <= -8.498317817530891e+35) {
tmp = t_1 / -t_2;
} else {
double t_3 = t_1 / sqrt(fma(4.0, ((t * t) / (x * x)), fma(4.0, ((t * t) / x), fma(2.0, ((l / x) * (l / x)), (2.0 * ((t * t) + ((l * l) / x)))))));
double tmp_1;
if (t <= -3.90766212138674e-166) {
tmp_1 = t_3;
} else if (t <= -8.964156268883778e-292) {
double t_4 = 2.0 + ((4.0 * (1.0 / x)) + (4.0 * (1.0 / pow(x, 2.0))));
double t_5 = sqrt(1.0 / t_4);
tmp_1 = t_1 / -(((pow(l, 2.0) / (t * x)) * t_5) + ((t_5 * (pow(l, 2.0) / (t * pow(x, 2.0)))) + (t * sqrt(t_4))));
} else if (t <= 3.0437925850526267e-168) {
double t_6 = sqrt(2.0) * x;
tmp_1 = t_1 / fma(t, sqrt(2.0), fma(2.0, (t / t_6), ((l * l) / (t * t_6))));
} else if (t <= 2.001416283313715e+49) {
tmp_1 = t_3;
} else {
tmp_1 = t_1 / t_2;
}
tmp = tmp_1;
}
return tmp;
}



Bits error versus x



Bits error versus l



Bits error versus t
if t < -8.49831781753089074e35Initial program 43.4
Simplified43.4
Taylor expanded in t around -inf 4.3
Simplified4.3
if -8.49831781753089074e35 < t < -3.9076621213867397e-166 or 3.0437925850526267e-168 < t < 2.00141628331371505e49Initial program 29.4
Simplified29.4
Taylor expanded in x around inf 11.2
Simplified11.2
Applied add-sqr-sqrt_binary6411.2
Simplified11.2
Simplified10.7
if -3.9076621213867397e-166 < t < -8.96415626888377794e-292Initial program 62.9
Simplified62.9
Taylor expanded in x around inf 38.1
Simplified38.1
Taylor expanded in t around -inf 30.1
if -8.96415626888377794e-292 < t < 3.0437925850526267e-168Initial program 62.8
Simplified62.8
Taylor expanded in x around inf 27.7
Simplified27.7
if 2.00141628331371505e49 < t Initial program 43.9
Simplified43.9
Taylor expanded in t around inf 3.5
Simplified3.5
Final simplification10.5
herbie shell --seed 2022020
(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)))))