\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 -3.094785260795066 \cdot 10^{+93}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{-t \cdot \sqrt{\frac{2}{x - 1} + 2 \cdot \frac{x}{x - 1}}}\\
\mathbf{elif}\;t \leq -7.8940362468376395 \cdot 10^{-177}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{\sqrt{2 \cdot \left(\ell \cdot \frac{\ell}{x}\right) + \left(t \cdot t\right) \cdot \left(2 + \frac{4}{x}\right)}}\\
\mathbf{elif}\;t \leq -4.552217556014532 \cdot 10^{-217}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{-t \cdot \sqrt{2 + 4 \cdot \frac{1}{x}}}\\
\mathbf{elif}\;t \leq 6.747218417347291 \cdot 10^{-224}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{\sqrt{2 \cdot \left(\sqrt{\frac{\ell \cdot \ell}{x}} \cdot \sqrt{\frac{\ell \cdot \ell}{x}}\right) + \left(2 \cdot \left(t \cdot t\right) + 4 \cdot \frac{t \cdot t}{x}\right)}}\\
\mathbf{elif}\;t \leq 1.0839695737903189 \cdot 10^{-126}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{t \cdot \sqrt{2} + \left(2 \cdot \frac{t}{\sqrt{2} \cdot x} + \frac{\ell \cdot \ell}{t \cdot \left(\sqrt{2} \cdot x\right)}\right)}\\
\mathbf{elif}\;t \leq 3.6158306802905055 \cdot 10^{+70}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{\sqrt{2 \cdot \left(\ell \cdot \frac{\ell}{x}\right) + 2 \cdot {t}^{2}}}\\
\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 -3.094785260795066e+93)
(/
(* t (sqrt 2.0))
(- (* t (sqrt (+ (/ 2.0 (- x 1.0)) (* 2.0 (/ x (- x 1.0))))))))
(if (<= t -7.8940362468376395e-177)
(/
(* t (sqrt 2.0))
(sqrt (+ (* 2.0 (* l (/ l x))) (* (* t t) (+ 2.0 (/ 4.0 x))))))
(if (<= t -4.552217556014532e-217)
(/ (* t (sqrt 2.0)) (- (* t (sqrt (+ 2.0 (* 4.0 (/ 1.0 x)))))))
(if (<= t 6.747218417347291e-224)
(/
(* t (sqrt 2.0))
(sqrt
(+
(* 2.0 (* (sqrt (/ (* l l) x)) (sqrt (/ (* l l) x))))
(+ (* 2.0 (* t t)) (* 4.0 (/ (* t t) x))))))
(if (<= t 1.0839695737903189e-126)
(/
(* t (sqrt 2.0))
(+
(* t (sqrt 2.0))
(+
(* 2.0 (/ t (* (sqrt 2.0) x)))
(/ (* l l) (* t (* (sqrt 2.0) x))))))
(if (<= t 3.6158306802905055e+70)
(/
(* t (sqrt 2.0))
(sqrt (+ (* 2.0 (* l (/ l x))) (* 2.0 (pow t 2.0)))))
(/
(* 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 <= -3.094785260795066e+93) {
tmp = (t * sqrt(2.0)) / -(t * sqrt((2.0 / (x - 1.0)) + (2.0 * (x / (x - 1.0)))));
} else if (t <= -7.8940362468376395e-177) {
tmp = (t * sqrt(2.0)) / sqrt((2.0 * (l * (l / x))) + ((t * t) * (2.0 + (4.0 / x))));
} else if (t <= -4.552217556014532e-217) {
tmp = (t * sqrt(2.0)) / -(t * sqrt(2.0 + (4.0 * (1.0 / x))));
} else if (t <= 6.747218417347291e-224) {
tmp = (t * sqrt(2.0)) / sqrt((2.0 * (sqrt((l * l) / x) * sqrt((l * l) / x))) + ((2.0 * (t * t)) + (4.0 * ((t * t) / x))));
} else if (t <= 1.0839695737903189e-126) {
tmp = (t * sqrt(2.0)) / ((t * sqrt(2.0)) + ((2.0 * (t / (sqrt(2.0) * x))) + ((l * l) / (t * (sqrt(2.0) * x)))));
} else if (t <= 3.6158306802905055e+70) {
tmp = (t * sqrt(2.0)) / sqrt((2.0 * (l * (l / x))) + (2.0 * pow(t, 2.0)));
} 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 < -3.09478526079506587e93Initial program 50.3
Taylor expanded around -inf 3.1
Simplified3.1
if -3.09478526079506587e93 < t < -7.89403624683763953e-177Initial program 28.4
Taylor expanded around inf 11.7
Simplified11.7
rmApplied *-un-lft-identity_binary64_7811.7
Applied times-frac_binary64_846.8
Simplified6.8
Taylor expanded around 0 6.8
Simplified6.8
if -7.89403624683763953e-177 < t < -4.55221755601453162e-217Initial program 63.3
Taylor expanded around inf 34.3
Simplified34.3
Taylor expanded around -inf 36.4
if -4.55221755601453162e-217 < t < 6.74721841734729116e-224Initial program 62.9
Taylor expanded around inf 29.6
Simplified29.6
rmApplied add-sqr-sqrt_binary64_10029.7
if 6.74721841734729116e-224 < t < 1.08396957379031891e-126Initial program 53.2
Taylor expanded around inf 21.8
Simplified21.8
if 1.08396957379031891e-126 < t < 3.6158306802905055e70Initial program 25.7
Taylor expanded around inf 9.5
Simplified9.5
rmApplied *-un-lft-identity_binary64_789.5
Applied times-frac_binary64_844.6
Simplified4.6
Taylor expanded around inf 4.9
if 3.6158306802905055e70 < t Initial program 47.2
Taylor expanded around inf 3.3
Simplified3.3
Final simplification9.1
herbie shell --seed 2021028
(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)))))