\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}
\mathbf{if}\;t \leq -5.914664076473897 \cdot 10^{+52}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{-t \cdot \sqrt{\frac{2}{x - 1} + 2 \cdot \frac{x}{x - 1}}}\\
\mathbf{elif}\;t \leq -2.4701061804313437 \cdot 10^{-188}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{\sqrt{2 \cdot \frac{\ell \cdot \ell}{x} + \left(4 \cdot \left(\frac{t \cdot t}{x} + \frac{t \cdot t}{x \cdot x}\right) + 2 \cdot \left(t \cdot t + \frac{\ell \cdot \ell}{x \cdot x}\right)\right)}}\\
\mathbf{elif}\;t \leq -1.9574460741136146 \cdot 10^{-305}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{-\left(t \cdot \sqrt{4 \cdot \frac{1}{{x}^{2}} + \left(2 + 4 \cdot \frac{1}{x}\right)} + \left(\sqrt{\frac{1}{4 \cdot \frac{1}{{x}^{2}} + \left(2 + 4 \cdot \frac{1}{x}\right)}} \cdot \frac{{\ell}^{2}}{t \cdot x} + \sqrt{\frac{1}{4 \cdot \frac{1}{{x}^{2}} + \left(2 + 4 \cdot \frac{1}{x}\right)}} \cdot \frac{{\ell}^{2}}{t \cdot {x}^{2}}\right)\right)}\\
\mathbf{elif}\;t \leq 5.9913150483020484 \cdot 10^{-179}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{t \cdot \sqrt{2} + \left(2 \cdot \frac{t}{\sqrt{2} \cdot x} + \frac{{\ell}^{2}}{t \cdot \left(\sqrt{2} \cdot x\right)}\right)}\\
\mathbf{elif}\;t \leq 4.479554032002455 \cdot 10^{-39}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{\sqrt{2 \cdot \frac{\ell \cdot \ell}{x} + \left(2 \cdot \left(t \cdot t\right) + 4 \cdot \frac{t \cdot t}{x}\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{t \cdot \sqrt{\frac{2}{x - 1} + 2 \cdot \frac{x}{x - 1}}}\\
\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
(if (<= t -5.914664076473897e+52)
(/
(* t (sqrt 2.0))
(- (* t (sqrt (+ (/ 2.0 (- x 1.0)) (* 2.0 (/ x (- x 1.0))))))))
(if (<= t -2.4701061804313437e-188)
(/
(* t (sqrt 2.0))
(sqrt
(+
(* 2.0 (/ (* l l) x))
(+
(* 4.0 (+ (/ (* t t) x) (/ (* t t) (* x x))))
(* 2.0 (+ (* t t) (/ (* l l) (* x x))))))))
(if (<= t -1.9574460741136146e-305)
(/
(* t (sqrt 2.0))
(-
(+
(*
t
(sqrt (+ (* 4.0 (/ 1.0 (pow x 2.0))) (+ 2.0 (* 4.0 (/ 1.0 x))))))
(+
(*
(sqrt
(/ 1.0 (+ (* 4.0 (/ 1.0 (pow x 2.0))) (+ 2.0 (* 4.0 (/ 1.0 x))))))
(/ (pow l 2.0) (* t x)))
(*
(sqrt
(/ 1.0 (+ (* 4.0 (/ 1.0 (pow x 2.0))) (+ 2.0 (* 4.0 (/ 1.0 x))))))
(/ (pow l 2.0) (* t (pow x 2.0))))))))
(if (<= t 5.9913150483020484e-179)
(/
(* t (sqrt 2.0))
(+
(* t (sqrt 2.0))
(+
(* 2.0 (/ t (* (sqrt 2.0) x)))
(/ (pow l 2.0) (* t (* (sqrt 2.0) x))))))
(if (<= t 4.479554032002455e-39)
(/
(* t (sqrt 2.0))
(sqrt
(+
(* 2.0 (/ (* l l) x))
(+ (* 2.0 (* t t)) (* 4.0 (/ (* t t) x))))))
(/
(* t (sqrt 2.0))
(* t (sqrt (+ (/ 2.0 (- x 1.0)) (* 2.0 (/ x (- x 1.0)))))))))))))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 tmp;
if (t <= -5.914664076473897e+52) {
tmp = (t * sqrt(2.0)) / -(t * sqrt((2.0 / (x - 1.0)) + (2.0 * (x / (x - 1.0)))));
} else if (t <= -2.4701061804313437e-188) {
tmp = (t * sqrt(2.0)) / sqrt((2.0 * ((l * l) / x)) + ((4.0 * (((t * t) / x) + ((t * t) / (x * x)))) + (2.0 * ((t * t) + ((l * l) / (x * x))))));
} else if (t <= -1.9574460741136146e-305) {
tmp = (t * sqrt(2.0)) / -((t * sqrt((4.0 * (1.0 / pow(x, 2.0))) + (2.0 + (4.0 * (1.0 / x))))) + ((sqrt(1.0 / ((4.0 * (1.0 / pow(x, 2.0))) + (2.0 + (4.0 * (1.0 / x))))) * (pow(l, 2.0) / (t * x))) + (sqrt(1.0 / ((4.0 * (1.0 / pow(x, 2.0))) + (2.0 + (4.0 * (1.0 / x))))) * (pow(l, 2.0) / (t * pow(x, 2.0))))));
} else if (t <= 5.9913150483020484e-179) {
tmp = (t * sqrt(2.0)) / ((t * sqrt(2.0)) + ((2.0 * (t / (sqrt(2.0) * x))) + (pow(l, 2.0) / (t * (sqrt(2.0) * x)))));
} else if (t <= 4.479554032002455e-39) {
tmp = (t * sqrt(2.0)) / sqrt((2.0 * ((l * l) / x)) + ((2.0 * (t * t)) + (4.0 * ((t * t) / x))));
} else {
tmp = (t * sqrt(2.0)) / (t * sqrt((2.0 / (x - 1.0)) + (2.0 * (x / (x - 1.0)))));
}
return tmp;
}



Bits error versus x



Bits error versus l



Bits error versus t
Results
if t < -5.91466407647389744e52Initial program 46.3
Taylor expanded around -inf 3.7
Simplified3.7
if -5.91466407647389744e52 < t < -2.47010618043134374e-188Initial program 32.2
Taylor expanded around inf 13.4
Simplified13.4
if -2.47010618043134374e-188 < t < -1.95744607411361461e-305Initial program 62.5
Taylor expanded around inf 39.4
Simplified39.4
Taylor expanded around -inf 29.6
if -1.95744607411361461e-305 < t < 5.9913150483020484e-179Initial program 63.1
Taylor expanded around inf 25.4
if 5.9913150483020484e-179 < t < 4.47955403200245468e-39Initial program 37.6
Taylor expanded around inf 12.5
Simplified12.5
if 4.47955403200245468e-39 < t Initial program 40.7
Taylor expanded around inf 6.3
Simplified6.3
Final simplification10.8
herbie shell --seed 2021059
(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)))))