\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.1493377557846525 \cdot 10^{+94}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{-t \cdot \sqrt{\frac{2}{x - 1} + 2 \cdot \frac{x}{x - 1}}}\\
\mathbf{elif}\;t \leq -1.2243070715583163 \cdot 10^{-124}:\\
\;\;\;\;\frac{\sqrt{\sqrt{2}} \cdot \left(t \cdot \sqrt{\sqrt{2}}\right)}{\sqrt{2 \cdot \left(\ell \cdot \frac{\ell}{x}\right) + \left(2 \cdot \left(t \cdot t\right) + 4 \cdot \frac{t \cdot t}{x}\right)}}\\
\mathbf{elif}\;t \leq -1.037946830000933 \cdot 10^{-300}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{-\left(t \cdot \sqrt{2 + 4 \cdot \frac{1}{x}} + \sqrt{\frac{1}{2 + 4 \cdot \frac{1}{x}}} \cdot \frac{{\ell}^{2}}{t \cdot x}\right)}\\
\mathbf{elif}\;t \leq 2.7803948899544386 \cdot 10^{-160}:\\
\;\;\;\;\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 1.7408606400845876 \cdot 10^{+113}:\\
\;\;\;\;\frac{\sqrt{\sqrt{2}} \cdot \left(t \cdot \sqrt{\sqrt{2}}\right)}{\sqrt{2 \cdot \left(\ell \cdot \frac{\ell}{x}\right) + \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{2}}\\
\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.1493377557846525e+94)
(/
(* t (sqrt 2.0))
(- (* t (sqrt (+ (/ 2.0 (- x 1.0)) (* 2.0 (/ x (- x 1.0))))))))
(if (<= t -1.2243070715583163e-124)
(/
(* (sqrt (sqrt 2.0)) (* t (sqrt (sqrt 2.0))))
(sqrt
(+ (* 2.0 (* l (/ l x))) (+ (* 2.0 (* t t)) (* 4.0 (/ (* t t) x))))))
(if (<= t -1.037946830000933e-300)
(/
(* t (sqrt 2.0))
(-
(+
(* t (sqrt (+ 2.0 (* 4.0 (/ 1.0 x)))))
(*
(sqrt (/ 1.0 (+ 2.0 (* 4.0 (/ 1.0 x)))))
(/ (pow l 2.0) (* t x))))))
(if (<= t 2.7803948899544386e-160)
(/
(* t (sqrt 2.0))
(+
(* t (sqrt 2.0))
(+
(* 2.0 (/ t (* (sqrt 2.0) x)))
(/ (* l l) (* t (* (sqrt 2.0) x))))))
(if (<= t 1.7408606400845876e+113)
(/
(* (sqrt (sqrt 2.0)) (* t (sqrt (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)))))))))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.1493377557846525e+94) {
tmp = (t * sqrt(2.0)) / -(t * sqrt((2.0 / (x - 1.0)) + (2.0 * (x / (x - 1.0)))));
} else if (t <= -1.2243070715583163e-124) {
tmp = (sqrt(sqrt(2.0)) * (t * sqrt(sqrt(2.0)))) / sqrt((2.0 * (l * (l / x))) + ((2.0 * (t * t)) + (4.0 * ((t * t) / x))));
} else if (t <= -1.037946830000933e-300) {
tmp = (t * sqrt(2.0)) / -((t * sqrt(2.0 + (4.0 * (1.0 / x)))) + (sqrt(1.0 / (2.0 + (4.0 * (1.0 / x)))) * (pow(l, 2.0) / (t * x))));
} else if (t <= 2.7803948899544386e-160) {
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 <= 1.7408606400845876e+113) {
tmp = (sqrt(sqrt(2.0)) * (t * sqrt(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));
}
return tmp;
}



Bits error versus x



Bits error versus l



Bits error versus t
Results
if t < -3.1493377557846525e94Initial program 50.4
Taylor expanded around -inf 2.9
Simplified2.9
if -3.1493377557846525e94 < t < -1.2243070715583163e-124 or 2.78039488995443864e-160 < t < 1.7408606400845876e113Initial program 25.1
Taylor expanded around inf 9.8
Simplified9.8
rmApplied *-un-lft-identity_binary64_789.8
Applied times-frac_binary64_844.9
Simplified4.9
rmApplied add-sqr-sqrt_binary64_1005.1
Applied associate-*l*_binary64_195.0
if -1.2243070715583163e-124 < t < -1.0379468300009329e-300Initial program 58.0
Taylor expanded around inf 29.3
Simplified29.3
Taylor expanded around -inf 25.9
if -1.0379468300009329e-300 < t < 2.78039488995443864e-160Initial program 62.8
Taylor expanded around inf 25.4
Simplified25.4
if 1.7408606400845876e113 < t Initial program 52.3
Taylor expanded around inf 3.7
Final simplification8.7
herbie shell --seed 2021050
(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)))))