\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 -66516108.83864204:\\
\;\;\;\;\frac{t_1}{-t_2}\\
\mathbf{else}:\\
\;\;\;\;\begin{array}{l}
t_3 := \frac{t_1}{\sqrt{\mathsf{fma}\left(4, \frac{t \cdot t}{x}, 2 \cdot \left(t \cdot t + \frac{\ell \cdot \ell}{x}\right)\right)}}\\
\mathbf{if}\;t \leq -4.0200485935821406 \cdot 10^{-165}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq -5.818528907553507 \cdot 10^{-193}:\\
\;\;\;\;\begin{array}{l}
t_4 := 2 + \left(\frac{4}{x} + \left(\frac{4}{{x}^{3}} + \frac{4}{x \cdot x}\right)\right)\\
t_5 := \sqrt{\frac{1}{t_4}}\\
\frac{t_1}{-\mathsf{fma}\left(\frac{\ell \cdot \ell}{t \cdot \left(x \cdot x\right)}, t_5, \mathsf{fma}\left(t, \sqrt{t_4}, t_5 \cdot \left(\frac{\ell \cdot \ell}{t \cdot {x}^{3}} + \frac{\ell \cdot \ell}{t \cdot x}\right)\right)\right)}
\end{array}\\
\mathbf{elif}\;t \leq 3.3277568664650287 \cdot 10^{+22}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;\frac{t_1}{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 (* t (sqrt 2.0)))
(t_2 (* t (sqrt (+ (/ 2.0 (- x 1.0)) (* 2.0 (/ x (- x 1.0))))))))
(if (<= t -66516108.83864204)
(/ t_1 (- t_2))
(let* ((t_3
(/
t_1
(sqrt
(fma 4.0 (/ (* t t) x) (* 2.0 (+ (* t t) (/ (* l l) x))))))))
(if (<= t -4.0200485935821406e-165)
t_3
(if (<= t -5.818528907553507e-193)
(let* ((t_4
(+
2.0
(+ (/ 4.0 x) (+ (/ 4.0 (pow x 3.0)) (/ 4.0 (* x x))))))
(t_5 (sqrt (/ 1.0 t_4))))
(/
t_1
(-
(fma
(/ (* l l) (* t (* x x)))
t_5
(fma
t
(sqrt t_4)
(*
t_5
(+ (/ (* l l) (* t (pow x 3.0))) (/ (* l l) (* t x)))))))))
(if (<= t 3.3277568664650287e+22) t_3 (/ 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 <= -66516108.83864204) {
tmp = t_1 / -t_2;
} else {
double t_3 = t_1 / sqrt(fma(4.0, ((t * t) / x), (2.0 * ((t * t) + ((l * l) / x)))));
double tmp_1;
if (t <= -4.0200485935821406e-165) {
tmp_1 = t_3;
} else if (t <= -5.818528907553507e-193) {
double t_4 = 2.0 + ((4.0 / x) + ((4.0 / pow(x, 3.0)) + (4.0 / (x * x))));
double t_5 = sqrt(1.0 / t_4);
tmp_1 = t_1 / -fma(((l * l) / (t * (x * x))), t_5, fma(t, sqrt(t_4), (t_5 * (((l * l) / (t * pow(x, 3.0))) + ((l * l) / (t * x))))));
} else if (t <= 3.3277568664650287e+22) {
tmp_1 = t_3;
} else {
tmp_1 = t_1 / t_2;
}
tmp = tmp_1;
}
return tmp;
}



Bits error versus x



Bits error versus l



Bits error versus t
if t < -66516108.8386420384Initial program 42.7
Simplified42.7
Taylor expanded in t around -inf 5.1
Simplified5.1
if -66516108.8386420384 < t < -4.020048593582141e-165 or -5.8185289075535073e-193 < t < 3.3277568664650287e22Initial program 43.2
Simplified43.2
Taylor expanded in x around inf 19.2
Simplified19.2
if -4.020048593582141e-165 < t < -5.8185289075535073e-193Initial program 63.3
Simplified63.3
Taylor expanded in x around inf 45.6
Simplified45.6
Taylor expanded in t around -inf 22.5
Simplified22.5
if 3.3277568664650287e22 < t Initial program 43.4
Simplified43.4
Taylor expanded in t around inf 4.4
Simplified4.4
Final simplification11.2
herbie shell --seed 2021280
(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)))))