\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 -3.8721814473273005 \cdot 10^{+137}:\\
\;\;\;\;\frac{t_1}{-t_2}\\
\mathbf{elif}\;t \leq 3.4585179810977915 \cdot 10^{+148}:\\
\;\;\;\;\frac{t_1}{\sqrt{\mathsf{fma}\left(4, \frac{t \cdot t}{x}, 2 \cdot \left(t \cdot t + \frac{\ell}{\frac{x}{\ell}}\right)\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{t_1}{t_2}\\
\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 -3.8721814473273005e+137)
(/ t_1 (- t_2))
(if (<= t 3.4585179810977915e+148)
(/ t_1 (sqrt (fma 4.0 (/ (* t t) x) (* 2.0 (+ (* t t) (/ l (/ x l)))))))
(/ 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 <= -3.8721814473273005e+137) {
tmp = t_1 / -t_2;
} else if (t <= 3.4585179810977915e+148) {
tmp = t_1 / sqrt(fma(4.0, ((t * t) / x), (2.0 * ((t * t) + (l / (x / l))))));
} else {
tmp = t_1 / t_2;
}
return tmp;
}



Bits error versus x



Bits error versus l



Bits error versus t
if t < -3.8721814473273005e137Initial program 58.5
Simplified58.5
Taylor expanded in t around -inf 2.1
Simplified2.1
if -3.8721814473273005e137 < t < 3.45851798109779149e148Initial program 35.6
Simplified35.6
Taylor expanded in x around inf 16.8
Simplified16.8
Applied associate-/l*_binary6412.5
if 3.45851798109779149e148 < t Initial program 61.0
Simplified61.0
Taylor expanded in t around inf 2.2
Simplified2.2
Final simplification9.1
herbie shell --seed 2022082
(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)))))