\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 -2.650489049077127 \cdot 10^{+17}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{\frac{t}{\sqrt{2} \cdot \left(x \cdot x\right)} - \left(t \cdot \sqrt{2} + \frac{2}{\sqrt{2}} \cdot \left(\frac{t}{x \cdot x} + \frac{t}{x}\right)\right)}\\
\mathbf{elif}\;t \leq -7.168543711359687 \cdot 10^{-209}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{\sqrt{4 \cdot \frac{t \cdot t}{x} + 2 \cdot \left(t \cdot t + \ell \cdot \frac{\ell}{x}\right)}}\\
\mathbf{elif}\;t \leq -3.8356938576006817 \cdot 10^{-262}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{\frac{\frac{t}{x}}{\sqrt{2} \cdot x} - \left(t \cdot \sqrt{2} + 2 \cdot \frac{t}{\sqrt{2} \cdot x}\right)}\\
\mathbf{elif}\;t \leq 1.2532264623485196 \cdot 10^{-241}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{\sqrt{4 \cdot \frac{t \cdot t}{x} + 2 \cdot \left(t \cdot t + \frac{1}{\frac{x}{\ell \cdot \ell}}\right)}}\\
\mathbf{elif}\;t \leq 1.7732721537111569 \cdot 10^{-180} \lor \neg \left(t \leq 1.0360494278012444 \cdot 10^{+30}\right):\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{\left(t \cdot \sqrt{2} + 2 \cdot \frac{t}{\sqrt{2} \cdot x}\right) - \frac{\frac{t}{x}}{\sqrt{2} \cdot x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{\sqrt{4 \cdot \frac{t \cdot t}{x} + 2 \cdot \left(t \cdot t + \frac{\ell}{\frac{x}{\ell}}\right)}}\\
\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 -2.650489049077127e+17)
(/
(* t (sqrt 2.0))
(-
(/ t (* (sqrt 2.0) (* x x)))
(+ (* t (sqrt 2.0)) (* (/ 2.0 (sqrt 2.0)) (+ (/ t (* x x)) (/ t x))))))
(if (<= t -7.168543711359687e-209)
(/
(* t (sqrt 2.0))
(sqrt (+ (* 4.0 (/ (* t t) x)) (* 2.0 (+ (* t t) (* l (/ l x)))))))
(if (<= t -3.8356938576006817e-262)
(/
(* t (sqrt 2.0))
(-
(/ (/ t x) (* (sqrt 2.0) x))
(+ (* t (sqrt 2.0)) (* 2.0 (/ t (* (sqrt 2.0) x))))))
(if (<= t 1.2532264623485196e-241)
(/
(* t (sqrt 2.0))
(sqrt
(+
(* 4.0 (/ (* t t) x))
(* 2.0 (+ (* t t) (/ 1.0 (/ x (* l l))))))))
(if (or (<= t 1.7732721537111569e-180)
(not (<= t 1.0360494278012444e+30)))
(/
(* t (sqrt 2.0))
(-
(+ (* t (sqrt 2.0)) (* 2.0 (/ t (* (sqrt 2.0) x))))
(/ (/ t x) (* (sqrt 2.0) x))))
(/
(* t (sqrt 2.0))
(sqrt
(+
(* 4.0 (/ (* t t) x))
(* 2.0 (+ (* t t) (/ l (/ x l)))))))))))))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 <= -2.650489049077127e+17) {
tmp = (t * sqrt(2.0)) / ((t / (sqrt(2.0) * (x * x))) - ((t * sqrt(2.0)) + ((2.0 / sqrt(2.0)) * ((t / (x * x)) + (t / x)))));
} else if (t <= -7.168543711359687e-209) {
tmp = (t * sqrt(2.0)) / sqrt((4.0 * ((t * t) / x)) + (2.0 * ((t * t) + (l * (l / x)))));
} else if (t <= -3.8356938576006817e-262) {
tmp = (t * sqrt(2.0)) / (((t / x) / (sqrt(2.0) * x)) - ((t * sqrt(2.0)) + (2.0 * (t / (sqrt(2.0) * x)))));
} else if (t <= 1.2532264623485196e-241) {
tmp = (t * sqrt(2.0)) / sqrt((4.0 * ((t * t) / x)) + (2.0 * ((t * t) + (1.0 / (x / (l * l))))));
} else if ((t <= 1.7732721537111569e-180) || !(t <= 1.0360494278012444e+30)) {
tmp = (t * sqrt(2.0)) / (((t * sqrt(2.0)) + (2.0 * (t / (sqrt(2.0) * x)))) - ((t / x) / (sqrt(2.0) * x)));
} else {
tmp = (t * sqrt(2.0)) / sqrt((4.0 * ((t * t) / x)) + (2.0 * ((t * t) + (l / (x / l)))));
}
return tmp;
}



Bits error versus x



Bits error versus l



Bits error versus t
Results
if t < -265048904907712700Initial program 42.9
Taylor expanded around -inf 4.7
Simplified4.7
if -265048904907712700 < t < -7.16854371135968704e-209Initial program 36.8
Taylor expanded around inf 14.6
Simplified14.6
rmApplied *-un-lft-identity_binary64_7814.6
Applied times-frac_binary64_8410.3
Simplified10.3
if -7.16854371135968704e-209 < t < -3.83569385760068168e-262Initial program 62.7
Taylor expanded around inf 31.4
Simplified31.4
Taylor expanded around -inf 38.7
Simplified38.7
if -3.83569385760068168e-262 < t < 1.25322646234851964e-241Initial program 63.2
Taylor expanded around inf 31.1
Simplified31.1
rmApplied clear-num_binary64_7731.5
if 1.25322646234851964e-241 < t < 1.77327215371115688e-180 or 1.0360494278012444e30 < t Initial program 46.1
Taylor expanded around inf 40.4
Simplified40.4
Taylor expanded around inf 9.2
Simplified9.2
if 1.77327215371115688e-180 < t < 1.0360494278012444e30Initial program 33.4
Taylor expanded around inf 13.3
Simplified13.3
rmApplied associate-/l*_binary64_237.6
Final simplification10.5
herbie shell --seed 2020356
(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)))))