\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 := \frac{2}{-1 + x}\\
t_2 := \frac{x}{-1 + x}\\
\mathbf{if}\;t \leq -4.11613686570875 \cdot 10^{-189}:\\
\;\;\;\;\frac{\sqrt{2}}{-1} \cdot \frac{1}{\sqrt{\mathsf{fma}\left(2, t_2, t_1\right)}}\\
\mathbf{else}:\\
\;\;\;\;\begin{array}{l}
t_3 := t \cdot \sqrt{2}\\
\mathbf{if}\;t \leq -1.24248538485762 \cdot 10^{-227}:\\
\;\;\;\;\frac{t_3}{\ell \cdot \sqrt{\frac{2}{x} + \frac{2}{x \cdot x}}}\\
\mathbf{elif}\;t \leq 9.712836101563572 \cdot 10^{-275}:\\
\;\;\;\;\begin{array}{l}
t_4 := 2 + \left(\frac{4}{x} + \frac{4}{x \cdot x}\right)\\
\frac{t_3}{-\left(\sqrt{\frac{1}{t_4}} \cdot \left(\frac{\ell \cdot \ell}{t \cdot x} + \frac{\ell \cdot \ell}{t \cdot \left(x \cdot x\right)}\right) + t \cdot \sqrt{t_4}\right)}
\end{array}\\
\mathbf{elif}\;t \leq 2.6385176775619647 \cdot 10^{-5}:\\
\;\;\;\;\begin{array}{l}
t_5 := \frac{\ell \cdot \ell}{x}\\
\frac{t_3}{\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{t_5}{x}, 2 \cdot \left(t \cdot t + t_5\right)\right)\right)\right)}}
\end{array}\\
\mathbf{else}:\\
\;\;\;\;\frac{t_3}{t \cdot \sqrt{t_1 + 2 \cdot 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 (/ 2.0 (+ -1.0 x))) (t_2 (/ x (+ -1.0 x))))
(if (<= t -4.11613686570875e-189)
(* (/ (sqrt 2.0) -1.0) (/ 1.0 (sqrt (fma 2.0 t_2 t_1))))
(let* ((t_3 (* t (sqrt 2.0))))
(if (<= t -1.24248538485762e-227)
(/ t_3 (* l (sqrt (+ (/ 2.0 x) (/ 2.0 (* x x))))))
(if (<= t 9.712836101563572e-275)
(let* ((t_4 (+ 2.0 (+ (/ 4.0 x) (/ 4.0 (* x x))))))
(/
t_3
(-
(+
(*
(sqrt (/ 1.0 t_4))
(+ (/ (* l l) (* t x)) (/ (* l l) (* t (* x x)))))
(* t (sqrt t_4))))))
(if (<= t 2.6385176775619647e-5)
(let* ((t_5 (/ (* l l) x)))
(/
t_3
(sqrt
(fma
4.0
(/ (* t t) (* x x))
(fma
4.0
(/ (* t t) x)
(fma 2.0 (/ t_5 x) (* 2.0 (+ (* t t) t_5))))))))
(/ t_3 (* t (sqrt (+ t_1 (* 2.0 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 = 2.0 / (-1.0 + x);
double t_2 = x / (-1.0 + x);
double tmp;
if (t <= -4.11613686570875e-189) {
tmp = (sqrt(2.0) / -1.0) * (1.0 / sqrt(fma(2.0, t_2, t_1)));
} else {
double t_3 = t * sqrt(2.0);
double tmp_1;
if (t <= -1.24248538485762e-227) {
tmp_1 = t_3 / (l * sqrt((2.0 / x) + (2.0 / (x * x))));
} else if (t <= 9.712836101563572e-275) {
double t_4 = 2.0 + ((4.0 / x) + (4.0 / (x * x)));
tmp_1 = t_3 / -((sqrt(1.0 / t_4) * (((l * l) / (t * x)) + ((l * l) / (t * (x * x))))) + (t * sqrt(t_4)));
} else if (t <= 2.6385176775619647e-5) {
double t_5 = (l * l) / x;
tmp_1 = t_3 / sqrt(fma(4.0, ((t * t) / (x * x)), fma(4.0, ((t * t) / x), fma(2.0, (t_5 / x), (2.0 * ((t * t) + t_5))))));
} else {
tmp_1 = t_3 / (t * sqrt(t_1 + (2.0 * t_2)));
}
tmp = tmp_1;
}
return tmp;
}



Bits error versus x



Bits error versus l



Bits error versus t
if t < -4.11613686570875029e-189Initial program 39.3
Simplified39.3
Taylor expanded in t around -inf 10.4
Simplified10.4
Applied neg-mul-1_binary6410.4
Applied times-frac_binary6410.5
Simplified10.4
if -4.11613686570875029e-189 < t < -1.24248538485762e-227Initial program 63.9
Simplified63.9
Taylor expanded in x around inf 37.7
Simplified37.7
Taylor expanded in l around inf 36.8
Simplified36.8
if -1.24248538485762e-227 < t < 9.7128361015635722e-275Initial program 63.1
Simplified63.1
Taylor expanded in x around inf 37.1
Simplified37.1
Taylor expanded in t around -inf 35.5
Simplified35.5
if 9.7128361015635722e-275 < t < 2.6385176775619647e-5Initial program 43.3
Simplified43.3
Taylor expanded in x around inf 20.2
Simplified20.2
Applied associate-/r*_binary6417.9
if 2.6385176775619647e-5 < t Initial program 41.5
Simplified41.5
Taylor expanded in t around inf 4.8
Simplified4.8
Final simplification12.5
herbie shell --seed 2022088
(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)))))