\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}\\
\mathbf{if}\;t \leq -2.1880656708238855 \cdot 10^{-308}:\\
\;\;\;\;\begin{array}{l}
t_2 := 2 + \left(\frac{4}{x} + \frac{4}{x \cdot x}\right)\\
\frac{-t_1}{\sqrt{\frac{1}{t_2}} \cdot \left(\frac{\ell}{x} \cdot \left(\frac{\ell}{t} + \frac{\ell}{t \cdot x}\right)\right) + t \cdot \sqrt{t_2}}
\end{array}\\
\mathbf{else}:\\
\;\;\;\;\frac{t_1}{t_1 + \left(2 \cdot \frac{t}{\sqrt{2} \cdot x} + \frac{\ell \cdot \ell}{t_1 \cdot x}\right)}\\
\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))))
(if (<= t -2.1880656708238855e-308)
(let* ((t_2 (+ 2.0 (+ (/ 4.0 x) (/ 4.0 (* x x))))))
(/
(- t_1)
(+
(* (sqrt (/ 1.0 t_2)) (* (/ l x) (+ (/ l t) (/ l (* t x)))))
(* t (sqrt t_2)))))
(/
t_1
(+ t_1 (+ (* 2.0 (/ t (* (sqrt 2.0) x))) (/ (* l l) (* t_1 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 = t * sqrt(2.0);
double tmp;
if (t <= -2.1880656708238855e-308) {
double t_2_1 = 2.0 + ((4.0 / x) + (4.0 / (x * x)));
tmp = -t_1 / ((sqrt(1.0 / t_2_1) * ((l / x) * ((l / t) + (l / (t * x))))) + (t * sqrt(t_2_1)));
} else {
tmp = t_1 / (t_1 + ((2.0 * (t / (sqrt(2.0) * x))) + ((l * l) / (t_1 * x))));
}
return tmp;
}



Bits error versus x



Bits error versus l



Bits error versus t
Results
if t < -2.1880656708238855e-308Initial program 43.1
Taylor expanded around inf 33.1
Simplified33.1
Taylor expanded around -inf 18.2
Simplified17.2
rmApplied frac-2neg_binary6417.2
Simplified17.2
Simplified12.2
if -2.1880656708238855e-308 < t Initial program 41.9
Taylor expanded around inf 30.7
Simplified30.7
Taylor expanded around inf 16.4
Simplified16.4
Final simplification14.4
herbie shell --seed 2021206
(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)))))