\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{\frac{2}{x - 1} + 2 \cdot \frac{x}{x - 1}}\\
t_2 := t \cdot \sqrt{2}\\
\mathbf{if}\;t \leq -1.1296845245651568 \cdot 10^{+129}:\\
\;\;\;\;\frac{t_2}{-t_1}\\
\mathbf{else}:\\
\;\;\;\;\begin{array}{l}
t_3 := \frac{t \cdot t}{x}\\
\mathbf{if}\;t \leq -3.244214081833893 \cdot 10^{-124}:\\
\;\;\;\;\frac{t_2}{\sqrt{\mathsf{fma}\left(4, t_3, 2 \cdot \left(t \cdot t + \frac{\ell}{\frac{x}{\ell}}\right)\right)}}\\
\mathbf{elif}\;t \leq 4.33667404189508 \cdot 10^{-308}:\\
\;\;\;\;\begin{array}{l}
t_4 := 2 + \frac{4}{x}\\
\frac{t_2}{-\mathsf{fma}\left(t, \sqrt{t_4}, \frac{\ell \cdot \ell}{t \cdot x} \cdot \sqrt{\frac{1}{t_4}}\right)}
\end{array}\\
\mathbf{elif}\;t \leq 7.245697021475806 \cdot 10^{-165}:\\
\;\;\;\;\begin{array}{l}
t_5 := \sqrt{2} \cdot x\\
\frac{t_2}{\mathsf{fma}\left(t, \sqrt{2}, \mathsf{fma}\left(2, \frac{t}{t_5}, \frac{\ell \cdot \ell}{t \cdot t_5}\right)\right)}
\end{array}\\
\mathbf{elif}\;t \leq 9.321129763170555 \cdot 10^{+68}:\\
\;\;\;\;\begin{array}{l}
t_6 := \sqrt{t \cdot t + \ell \cdot \frac{\ell}{x}}\\
\frac{t_2}{\sqrt{\mathsf{fma}\left(4, t_3, 2 \cdot \left(t_6 \cdot t_6\right)\right)}}
\end{array}\\
\mathbf{else}:\\
\;\;\;\;\frac{t_2}{t_1}\\
\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 (- x 1.0)) (* 2.0 (/ x (- x 1.0)))))))
(t_2 (* t (sqrt 2.0))))
(if (<= t -1.1296845245651568e+129)
(/ t_2 (- t_1))
(let* ((t_3 (/ (* t t) x)))
(if (<= t -3.244214081833893e-124)
(/ t_2 (sqrt (fma 4.0 t_3 (* 2.0 (+ (* t t) (/ l (/ x l)))))))
(if (<= t 4.33667404189508e-308)
(let* ((t_4 (+ 2.0 (/ 4.0 x))))
(/
t_2
(-
(fma t (sqrt t_4) (* (/ (* l l) (* t x)) (sqrt (/ 1.0 t_4)))))))
(if (<= t 7.245697021475806e-165)
(let* ((t_5 (* (sqrt 2.0) x)))
(/
t_2
(fma t (sqrt 2.0) (fma 2.0 (/ t t_5) (/ (* l l) (* t t_5))))))
(if (<= t 9.321129763170555e+68)
(let* ((t_6 (sqrt (+ (* t t) (* l (/ l x))))))
(/ t_2 (sqrt (fma 4.0 t_3 (* 2.0 (* t_6 t_6))))))
(/ t_2 t_1)))))))))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 / (x - 1.0)) + (2.0 * (x / (x - 1.0))));
double t_2 = t * sqrt(2.0);
double tmp;
if (t <= -1.1296845245651568e+129) {
tmp = t_2 / -t_1;
} else {
double t_3 = (t * t) / x;
double tmp_1;
if (t <= -3.244214081833893e-124) {
tmp_1 = t_2 / sqrt(fma(4.0, t_3, (2.0 * ((t * t) + (l / (x / l))))));
} else if (t <= 4.33667404189508e-308) {
double t_4 = 2.0 + (4.0 / x);
tmp_1 = t_2 / -fma(t, sqrt(t_4), (((l * l) / (t * x)) * sqrt(1.0 / t_4)));
} else if (t <= 7.245697021475806e-165) {
double t_5 = sqrt(2.0) * x;
tmp_1 = t_2 / fma(t, sqrt(2.0), fma(2.0, (t / t_5), ((l * l) / (t * t_5))));
} else if (t <= 9.321129763170555e+68) {
double t_6 = sqrt((t * t) + (l * (l / x)));
tmp_1 = t_2 / sqrt(fma(4.0, t_3, (2.0 * (t_6 * t_6))));
} else {
tmp_1 = t_2 / t_1;
}
tmp = tmp_1;
}
return tmp;
}



Bits error versus x



Bits error versus l



Bits error versus t
if t < -1.12968452456515676e129Initial program 55.7
Simplified55.7
Taylor expanded in t around -inf 1.9
Simplified1.9
if -1.12968452456515676e129 < t < -3.2442140818338929e-124Initial program 22.2
Simplified22.2
Taylor expanded in x around inf 9.4
Simplified9.4
Applied associate-/l*_binary644.8
if -3.2442140818338929e-124 < t < 4.3366740418950802e-308Initial program 57.4
Simplified57.4
Taylor expanded in x around inf 30.6
Simplified30.6
Taylor expanded in t around -inf 22.1
Simplified22.1
if 4.3366740418950802e-308 < t < 7.2456970214758061e-165Initial program 63.3
Simplified63.3
Taylor expanded in x around inf 23.0
Simplified23.0
if 7.2456970214758061e-165 < t < 9.3211297631705548e68Initial program 28.3
Simplified28.3
Taylor expanded in x around inf 11.1
Simplified11.1
Applied *-un-lft-identity_binary6411.1
Applied times-frac_binary645.3
Simplified5.3
Applied add-sqr-sqrt_binary645.3
if 9.3211297631705548e68 < t Initial program 46.6
Simplified46.6
Taylor expanded in t around inf 3.5
Simplified3.5
Final simplification7.7
herbie shell --seed 2022103
(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)))))