\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.984298100935431 \cdot 10^{+31}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{-t \cdot \sqrt{2 \cdot \frac{1}{-1 + x} + 2 \cdot \frac{x}{-1 + x}}}\\
\mathbf{elif}\;t \leq -1.458683861294613 \cdot 10^{-172}:\\
\;\;\;\;\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 -4.4369086440200507 \cdot 10^{-305}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{-t \cdot \sqrt{2 \cdot \frac{1}{-1 + x} + 2 \cdot \frac{x}{-1 + x}}}\\
\mathbf{elif}\;t \leq 1.524603857316903 \cdot 10^{-123}:\\
\;\;\;\;\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 5.111159643392521 \cdot 10^{+84}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{\sqrt{2 \cdot \frac{{\ell}^{2}}{x} + \left(4 \cdot \frac{{t}^{2}}{x} + \left(2 \cdot \frac{{\ell}^{2}}{{x}^{3}} + \left(2 \cdot {t}^{2} + \left(2 \cdot \frac{{\ell}^{2}}{{x}^{2}} + \left(4 \cdot \frac{{t}^{2}}{{x}^{3}} + 4 \cdot \frac{{t}^{2}}{{x}^{2}}\right)\right)\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 -2.984298100935431e+31)
(/
(* t (sqrt 2.0))
(- (* t (sqrt (+ (* 2.0 (/ 1.0 (+ -1.0 x))) (* 2.0 (/ x (+ -1.0 x))))))))
(if (<= t -1.458683861294613e-172)
(/
(* 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 -4.4369086440200507e-305)
(/
(* t (sqrt 2.0))
(-
(* t (sqrt (+ (* 2.0 (/ 1.0 (+ -1.0 x))) (* 2.0 (/ x (+ -1.0 x))))))))
(if (<= t 1.524603857316903e-123)
(/
(* 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 5.111159643392521e+84)
(/
(* t (sqrt 2.0))
(sqrt
(+
(* 2.0 (/ (pow l 2.0) x))
(+
(* 4.0 (/ (pow t 2.0) x))
(+
(* 2.0 (/ (pow l 2.0) (pow x 3.0)))
(+
(* 2.0 (pow t 2.0))
(+
(* 2.0 (/ (pow l 2.0) (pow x 2.0)))
(+
(* 4.0 (/ (pow t 2.0) (pow x 3.0)))
(* 4.0 (/ (pow t 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 <= -2.984298100935431e+31) {
tmp = (t * sqrt(2.0)) / -(t * sqrt((2.0 * (1.0 / (-1.0 + x))) + (2.0 * (x / (-1.0 + x)))));
} else if (t <= -1.458683861294613e-172) {
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 <= -4.4369086440200507e-305) {
tmp = (t * sqrt(2.0)) / -(t * sqrt((2.0 * (1.0 / (-1.0 + x))) + (2.0 * (x / (-1.0 + x)))));
} else if (t <= 1.524603857316903e-123) {
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 <= 5.111159643392521e+84) {
tmp = (t * sqrt(2.0)) / sqrt((2.0 * (pow(l, 2.0) / x)) + ((4.0 * (pow(t, 2.0) / x)) + ((2.0 * (pow(l, 2.0) / pow(x, 3.0))) + ((2.0 * pow(t, 2.0)) + ((2.0 * (pow(l, 2.0) / pow(x, 2.0))) + ((4.0 * (pow(t, 2.0) / pow(x, 3.0))) + (4.0 * (pow(t, 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 < -2.9842981009354311e31 or -1.45868386129461291e-172 < t < -4.4369086440200507e-305Initial program 47.6
Taylor expanded around -inf 12.0
if -2.9842981009354311e31 < t < -1.45868386129461291e-172Initial program 31.9
Taylor expanded around inf 11.9
if -4.4369086440200507e-305 < t < 1.52460385731690287e-123Initial program 57.8
Taylor expanded around inf 24.0
if 1.52460385731690287e-123 < t < 5.11115964339252127e84Initial program 28.1
Taylor expanded around inf 12.7
if 5.11115964339252127e84 < t Initial program 50.0
Taylor expanded around inf 2.5
Final simplification11.5
herbie shell --seed 2021084
(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)))))