\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 -3.2023462066894274 \cdot 10^{+36}:\\
\;\;\;\;\frac{t_1}{-t \cdot \sqrt{\frac{2}{x - 1} + 2 \cdot \frac{x}{x - 1}}}\\
\mathbf{else}:\\
\;\;\;\;\begin{array}{l}
t_2 := 2 \cdot \left(t \cdot t + \frac{\ell \cdot \ell}{x}\right)\\
t_3 := \frac{t \cdot t}{x}\\
\mathbf{if}\;t \leq -2.391212643882269 \cdot 10^{-84}:\\
\;\;\;\;\frac{t_1}{\sqrt{\mathsf{fma}\left(4, \frac{t \cdot t}{x \cdot x}, \mathsf{fma}\left(4, t_3, \mathsf{fma}\left(2, \frac{\ell \cdot \ell}{x \cdot x}, t_2\right)\right)\right)}}\\
\mathbf{else}:\\
\;\;\;\;\begin{array}{l}
t_4 := t \cdot \sqrt{2 + \left(\frac{4}{x} + \frac{4}{x \cdot x}\right)}\\
\mathbf{if}\;t \leq -1.8440714154310572 \cdot 10^{-171}:\\
\;\;\;\;\frac{t_1}{-t_4}\\
\mathbf{elif}\;t \leq -1.2714670369176393 \cdot 10^{-211}:\\
\;\;\;\;\begin{array}{l}
t_5 := \frac{2}{x} + \frac{2}{x \cdot x}\\
t_6 := \sqrt{\frac{1}{t_5}}\\
\frac{t_1}{\mathsf{fma}\left(2, \frac{t \cdot t}{\left(x \cdot x\right) \cdot \ell} \cdot t_6, \mathsf{fma}\left(\ell, \sqrt{t_5}, t_6 \cdot \left(2 \cdot \frac{t \cdot t}{x \cdot \ell} + \frac{t \cdot t}{\ell}\right)\right)\right)}
\end{array}\\
\mathbf{elif}\;t \leq 229211672411.04373:\\
\;\;\;\;\frac{t_1}{\sqrt{\mathsf{fma}\left(4, t_3, t_2\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{t_1}{t_4}\\
\end{array}\\
\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))))
(if (<= t -3.2023462066894274e+36)
(/ t_1 (- (* t (sqrt (+ (/ 2.0 (- x 1.0)) (* 2.0 (/ x (- x 1.0))))))))
(let* ((t_2 (* 2.0 (+ (* t t) (/ (* l l) x)))) (t_3 (/ (* t t) x)))
(if (<= t -2.391212643882269e-84)
(/
t_1
(sqrt
(fma
4.0
(/ (* t t) (* x x))
(fma 4.0 t_3 (fma 2.0 (/ (* l l) (* x x)) t_2)))))
(let* ((t_4 (* t (sqrt (+ 2.0 (+ (/ 4.0 x) (/ 4.0 (* x x))))))))
(if (<= t -1.8440714154310572e-171)
(/ t_1 (- t_4))
(if (<= t -1.2714670369176393e-211)
(let* ((t_5 (+ (/ 2.0 x) (/ 2.0 (* x x))))
(t_6 (sqrt (/ 1.0 t_5))))
(/
t_1
(fma
2.0
(* (/ (* t t) (* (* x x) l)) t_6)
(fma
l
(sqrt t_5)
(* t_6 (+ (* 2.0 (/ (* t t) (* x l))) (/ (* t t) l)))))))
(if (<= t 229211672411.04373)
(/ t_1 (sqrt (fma 4.0 t_3 t_2)))
(/ t_1 t_4))))))))))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 <= -3.2023462066894274e+36) {
tmp = t_1 / -(t * sqrt((2.0 / (x - 1.0)) + (2.0 * (x / (x - 1.0)))));
} else {
double t_2 = 2.0 * ((t * t) + ((l * l) / x));
double t_3 = (t * t) / x;
double tmp_1;
if (t <= -2.391212643882269e-84) {
tmp_1 = t_1 / sqrt(fma(4.0, ((t * t) / (x * x)), fma(4.0, t_3, fma(2.0, ((l * l) / (x * x)), t_2))));
} else {
double t_4 = t * sqrt(2.0 + ((4.0 / x) + (4.0 / (x * x))));
double tmp_2;
if (t <= -1.8440714154310572e-171) {
tmp_2 = t_1 / -t_4;
} else if (t <= -1.2714670369176393e-211) {
double t_5 = (2.0 / x) + (2.0 / (x * x));
double t_6 = sqrt(1.0 / t_5);
tmp_2 = t_1 / fma(2.0, (((t * t) / ((x * x) * l)) * t_6), fma(l, sqrt(t_5), (t_6 * ((2.0 * ((t * t) / (x * l))) + ((t * t) / l)))));
} else if (t <= 229211672411.04373) {
tmp_2 = t_1 / sqrt(fma(4.0, t_3, t_2));
} else {
tmp_2 = t_1 / t_4;
}
tmp_1 = tmp_2;
}
tmp = tmp_1;
}
return tmp;
}



Bits error versus x



Bits error versus l



Bits error versus t
if t < -3.20234620668942736e36Initial program 44.2
Simplified44.2
Taylor expanded in t around -inf 4.0
Simplified4.0
if -3.20234620668942736e36 < t < -2.39121264388226897e-84Initial program 26.2
Simplified26.2
Taylor expanded in x around inf 11.4
Simplified11.4
if -2.39121264388226897e-84 < t < -1.8440714154310572e-171Initial program 35.0
Simplified35.0
Taylor expanded in x around inf 13.6
Simplified13.6
Taylor expanded in t around -inf 23.9
Simplified23.9
if -1.8440714154310572e-171 < t < -1.2714670369176393e-211Initial program 61.3
Simplified61.3
Taylor expanded in x around inf 38.2
Simplified38.2
Taylor expanded in l around inf 37.0
Simplified37.0
if -1.2714670369176393e-211 < t < 229211672411.043732Initial program 47.2
Simplified47.2
Taylor expanded in x around inf 22.3
Simplified22.3
if 229211672411.043732 < t Initial program 42.9
Simplified42.9
Taylor expanded in x around inf 40.8
Simplified40.8
Taylor expanded in t around inf 5.0
Simplified5.0
Final simplification12.3
herbie shell --seed 2022068
(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)))))