\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 -9.342725470987389 \cdot 10^{+21}:\\
\;\;\;\;\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.8982460853244696 \cdot 10^{+94}:\\
\;\;\;\;\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{else}:\\
\;\;\;\;e^{\log \left(\frac{\sqrt{2}}{\sqrt{2 \cdot \frac{x}{-1 + x} + \frac{2}{-1 + x}}}\right)}\\
\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 -9.342725470987389e+21)
(/
(* t (sqrt 2.0))
(- (* t (sqrt (+ (* 2.0 (/ 1.0 (+ -1.0 x))) (* 2.0 (/ x (+ -1.0 x))))))))
(if (<= t 1.8982460853244696e+94)
(/
(* 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))))))
(exp
(log
(/
(sqrt 2.0)
(sqrt (+ (* 2.0 (/ x (+ -1.0 x))) (/ 2.0 (+ -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 <= -9.342725470987389e+21) {
tmp = (t * sqrt(2.0)) / -(t * sqrt((2.0 * (1.0 / (-1.0 + x))) + (2.0 * (x / (-1.0 + x)))));
} else if (t <= 1.8982460853244696e+94) {
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 {
tmp = exp(log(sqrt(2.0) / sqrt((2.0 * (x / (-1.0 + x))) + (2.0 / (-1.0 + x)))));
}
return tmp;
}



Bits error versus x



Bits error versus l



Bits error versus t
Results
if t < -9.3427254709873887e21Initial program 41.2
Taylor expanded around -inf 4.3
if -9.3427254709873887e21 < t < 1.8982460853244696e94Initial program 41.2
Taylor expanded around inf 18.5
if 1.8982460853244696e94 < t Initial program 50.2
Taylor expanded around inf 3.1
Simplified3.1
rmApplied add-exp-log_binary64_1163.1
Applied add-exp-log_binary64_1169.2
Applied prod-exp_binary64_1279.4
Applied add-exp-log_binary64_1169.4
Applied add-exp-log_binary64_1169.4
Applied prod-exp_binary64_1273.3
Applied div-exp_binary64_1293.2
Simplified3.0
Final simplification11.5
herbie shell --seed 2021015
(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)))))