\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 -123.10441277465658:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{-t \cdot \sqrt{2 \cdot \frac{1}{-1 + x} + 2 \cdot \frac{x}{-1 + x}}}\\
\mathbf{elif}\;t \leq -2.97191195562455 \cdot 10^{-160}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{\sqrt{2 \cdot \frac{{\ell}^{2}}{x} + \left(4 \cdot \frac{{t}^{2}}{x} + 2 \cdot {t}^{2}\right)}}\\
\mathbf{elif}\;t \leq -2.6783763174270457 \cdot 10^{-220}:\\
\;\;\;\;\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 3.2882651861996704 \cdot 10^{-288}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{\ell \cdot \sqrt{2 \cdot \frac{1}{{x}^{2}} + 2 \cdot \frac{1}{x}}}\\
\mathbf{elif}\;t \leq 1.5653638338130407 \cdot 10^{-222}:\\
\;\;\;\;\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 77477067.12571414:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{\sqrt{2 \cdot \frac{{\ell}^{2}}{x} + \left(4 \cdot \frac{{t}^{2}}{x} + \left(4 \cdot \frac{{t}^{2}}{{x}^{2}} + \left(2 \cdot {t}^{2} + 2 \cdot \frac{{\ell}^{2}}{{x}^{2}}\right)\right)\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{t \cdot \sqrt{2 \cdot \frac{1}{-1 + x} + 2 \cdot \frac{x}{-1 + x}}}\\
\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 -123.10441277465658)
(/
(* t (sqrt 2.0))
(- (* t (sqrt (+ (* 2.0 (/ 1.0 (+ -1.0 x))) (* 2.0 (/ x (+ -1.0 x))))))))
(if (<= t -2.97191195562455e-160)
(/
(* t (sqrt 2.0))
(sqrt
(+
(* 2.0 (/ (pow l 2.0) x))
(+ (* 4.0 (/ (pow t 2.0) x)) (* 2.0 (pow t 2.0))))))
(if (<= t -2.6783763174270457e-220)
(/
(* 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 3.2882651861996704e-288)
(/
(* t (sqrt 2.0))
(* l (sqrt (+ (* 2.0 (/ 1.0 (pow x 2.0))) (* 2.0 (/ 1.0 x))))))
(if (<= t 1.5653638338130407e-222)
(/
(* 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 77477067.12571414)
(/
(* t (sqrt 2.0))
(sqrt
(+
(* 2.0 (/ (pow l 2.0) x))
(+
(* 4.0 (/ (pow t 2.0) x))
(+
(* 4.0 (/ (pow t 2.0) (pow x 2.0)))
(+
(* 2.0 (pow t 2.0))
(* 2.0 (/ (pow l 2.0) (pow x 2.0)))))))))
(/
(* t (sqrt 2.0))
(*
t
(sqrt
(+
(* 2.0 (/ 1.0 (+ -1.0 x)))
(* 2.0 (/ x (+ -1.0 x))))))))))))))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 <= -123.10441277465658) {
tmp = (t * sqrt(2.0)) / -(t * sqrt((2.0 * (1.0 / (-1.0 + x))) + (2.0 * (x / (-1.0 + x)))));
} else if (t <= -2.97191195562455e-160) {
tmp = (t * sqrt(2.0)) / sqrt((2.0 * (pow(l, 2.0) / x)) + ((4.0 * (pow(t, 2.0) / x)) + (2.0 * pow(t, 2.0))));
} else if (t <= -2.6783763174270457e-220) {
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 <= 3.2882651861996704e-288) {
tmp = (t * sqrt(2.0)) / (l * sqrt((2.0 * (1.0 / pow(x, 2.0))) + (2.0 * (1.0 / x))));
} else if (t <= 1.5653638338130407e-222) {
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 <= 77477067.12571414) {
tmp = (t * sqrt(2.0)) / sqrt((2.0 * (pow(l, 2.0) / x)) + ((4.0 * (pow(t, 2.0) / x)) + ((4.0 * (pow(t, 2.0) / pow(x, 2.0))) + ((2.0 * pow(t, 2.0)) + (2.0 * (pow(l, 2.0) / pow(x, 2.0)))))));
} else {
tmp = (t * sqrt(2.0)) / (t * sqrt((2.0 * (1.0 / (-1.0 + x))) + (2.0 * (x / (-1.0 + x)))));
}
return tmp;
}



Bits error versus x



Bits error versus l



Bits error versus t
Results
if t < -123.104412774656581Initial program 42.3
Taylor expanded around -inf 5.1
if -123.104412774656581 < t < -2.97191195562455016e-160Initial program 31.9
Taylor expanded around inf 9.7
if -2.97191195562455016e-160 < t < -2.67837631742704567e-220Initial program 62.8
Taylor expanded around inf 39.6
Simplified39.6
Taylor expanded around -inf 25.5
if -2.67837631742704567e-220 < t < 3.28826518619967038e-288Initial program 62.5
Taylor expanded around inf 35.7
Simplified35.7
Taylor expanded around inf 34.7
if 3.28826518619967038e-288 < t < 1.56536383381304075e-222Initial program 63.2
Taylor expanded around inf 26.9
if 1.56536383381304075e-222 < t < 77477067.1257141382Initial program 38.6
Taylor expanded around inf 16.6
if 77477067.1257141382 < t Initial program 41.8
Taylor expanded around inf 4.7
Final simplification11.1
herbie shell --seed 2021027
(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)))))