\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 -2.4402300862622605 \cdot 10^{+79}:\\
\;\;\;\;\frac{t_1}{-t_2}\\
\mathbf{else}:\\
\;\;\;\;\begin{array}{l}
t_3 := t \cdot t + \frac{\ell \cdot \ell}{x}\\
t_4 := \frac{t \cdot t}{x}\\
\mathbf{if}\;t \leq -1.0772899486568456 \cdot 10^{-149}:\\
\;\;\;\;\frac{t_1}{\sqrt{4 \cdot t_4 + 2 \cdot t_3}}\\
\mathbf{elif}\;t \leq 4.367261950907306 \cdot 10^{-309}:\\
\;\;\;\;\begin{array}{l}
t_5 := 2 + \left(\frac{4}{x} + \frac{4}{x \cdot x}\right)\\
\frac{t_1}{-\left(\sqrt{\frac{1}{t_5}} \cdot \left(\frac{\ell \cdot \ell}{t \cdot x} + \frac{\ell \cdot \ell}{x \cdot \left(t \cdot x\right)}\right) + t \cdot \sqrt{t_5}\right)}
\end{array}\\
\mathbf{elif}\;t \leq 6.110738326698442 \cdot 10^{-182}:\\
\;\;\;\;\frac{t_1}{t_1 + \left(2 \cdot \frac{t}{\sqrt{2} \cdot x} + \frac{\ell \cdot \ell}{t_1 \cdot x}\right)}\\
\mathbf{elif}\;t \leq 4.47805730708622 \cdot 10^{+52}:\\
\;\;\;\;\frac{t_1}{\sqrt{4 \cdot \left(t_4 + \frac{t \cdot t}{x \cdot x}\right) + 2 \cdot \left(t_3 + \frac{\ell \cdot \ell}{x \cdot x}\right)}}\\
\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 -2.4402300862622605e+79)
(/ t_1 (- t_2))
(let* ((t_3 (+ (* t t) (/ (* l l) x))) (t_4 (/ (* t t) x)))
(if (<= t -1.0772899486568456e-149)
(/ t_1 (sqrt (+ (* 4.0 t_4) (* 2.0 t_3))))
(if (<= t 4.367261950907306e-309)
(let* ((t_5 (+ 2.0 (+ (/ 4.0 x) (/ 4.0 (* x x))))))
(/
t_1
(-
(+
(*
(sqrt (/ 1.0 t_5))
(+ (/ (* l l) (* t x)) (/ (* l l) (* x (* t x)))))
(* t (sqrt t_5))))))
(if (<= t 6.110738326698442e-182)
(/
t_1
(+ t_1 (+ (* 2.0 (/ t (* (sqrt 2.0) x))) (/ (* l l) (* t_1 x)))))
(if (<= t 4.47805730708622e+52)
(/
t_1
(sqrt
(+
(* 4.0 (+ t_4 (/ (* t t) (* x x))))
(* 2.0 (+ t_3 (/ (* l l) (* x x)))))))
(/ 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 <= -2.4402300862622605e+79) {
tmp = t_1 / -t_2;
} else {
double t_3 = (t * t) + ((l * l) / x);
double t_4 = (t * t) / x;
double tmp_1;
if (t <= -1.0772899486568456e-149) {
tmp_1 = t_1 / sqrt((4.0 * t_4) + (2.0 * t_3));
} else if (t <= 4.367261950907306e-309) {
double t_5 = 2.0 + ((4.0 / x) + (4.0 / (x * x)));
tmp_1 = t_1 / -((sqrt(1.0 / t_5) * (((l * l) / (t * x)) + ((l * l) / (x * (t * x))))) + (t * sqrt(t_5)));
} else if (t <= 6.110738326698442e-182) {
tmp_1 = t_1 / (t_1 + ((2.0 * (t / (sqrt(2.0) * x))) + ((l * l) / (t_1 * x))));
} else if (t <= 4.47805730708622e+52) {
tmp_1 = t_1 / sqrt((4.0 * (t_4 + ((t * t) / (x * x)))) + (2.0 * (t_3 + ((l * l) / (x * x)))));
} else {
tmp_1 = t_1 / t_2;
}
tmp = tmp_1;
}
return tmp;
}



Bits error versus x



Bits error versus l



Bits error versus t
Results
if t < -2.44023008626226047e79Initial program 47.2
Taylor expanded around -inf 2.8
Simplified2.8
if -2.44023008626226047e79 < t < -1.07728994865684565e-149Initial program 27.4
Taylor expanded around inf 10.6
Simplified10.6
if -1.07728994865684565e-149 < t < 4.367261950907306e-309Initial program 61.3
Taylor expanded around inf 38.3
Simplified38.3
Taylor expanded around -inf 27.9
Simplified22.9
if 4.367261950907306e-309 < t < 6.1107383266984423e-182Initial program 63.2
Taylor expanded around inf 36.6
Simplified36.6
Taylor expanded around inf 25.2
Simplified25.1
if 6.1107383266984423e-182 < t < 4.47805730708621976e52Initial program 30.9
Taylor expanded around inf 11.4
Simplified11.4
if 4.47805730708621976e52 < t Initial program 44.4
Taylor expanded around inf 3.9
Simplified3.9
Final simplification9.8
herbie shell --seed 2021204
(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)))))