\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.1596595017542885 \cdot 10^{+73}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{-t \cdot \sqrt{\frac{4}{x \cdot x} + \left(2 + \frac{4}{x}\right)}}\\
\mathbf{elif}\;t \leq 3.421764604155924 \cdot 10^{-245}:\\
\;\;\;\;\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{elif}\;t \leq 1.1177883439917205 \cdot 10^{-163}:\\
\;\;\;\;\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 9.828494013545358 \cdot 10^{-58}:\\
\;\;\;\;\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{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.1596595017542885e+73)
(/ (* t (sqrt 2.0)) (- (* t (sqrt (+ (/ 4.0 (* x x)) (+ 2.0 (/ 4.0 x)))))))
(if (<= t 3.421764604155924e-245)
(/
(* t (sqrt 2.0))
(sqrt
(+ (* 2.0 (/ (* l l) x)) (+ (* 2.0 (* t t)) (* 4.0 (/ (* t t) x))))))
(if (<= t 1.1177883439917205e-163)
(/
(* t (sqrt 2.0))
(+
(* t (sqrt 2.0))
(+
(* 2.0 (/ t (* (sqrt 2.0) x)))
(/ (* l l) (* t (* (sqrt 2.0) x))))))
(if (<= t 9.828494013545358e-58)
(/
(* 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))))))))
(/
(* 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.1596595017542885e+73) {
tmp = (t * sqrt(2.0)) / -(t * sqrt((4.0 / (x * x)) + (2.0 + (4.0 / x))));
} else if (t <= 3.421764604155924e-245) {
tmp = (t * sqrt(2.0)) / sqrt((2.0 * ((l * l) / x)) + ((2.0 * (t * t)) + (4.0 * ((t * t) / x))));
} else if (t <= 1.1177883439917205e-163) {
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 <= 9.828494013545358e-58) {
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 {
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.1596595017542885e73Initial program 46.6
Taylor expanded around inf 46.0
Simplified46.0
Taylor expanded around -inf 4.0
Simplified4.0
if -5.1596595017542885e73 < t < 3.42176460415592403e-245Initial program 42.6
Taylor expanded around inf 19.4
Simplified19.4
if 3.42176460415592403e-245 < t < 1.1177883439917205e-163Initial program 63.0
Taylor expanded around inf 24.3
Simplified24.3
if 1.1177883439917205e-163 < t < 9.82849401354535787e-58Initial program 35.2
Taylor expanded around inf 9.7
Simplified9.7
if 9.82849401354535787e-58 < t Initial program 39.6
Taylor expanded around inf 6.2
Simplified6.2
Final simplification11.2
herbie shell --seed 2021069
(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)))))