\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 -1.1973600433919266 \cdot 10^{-60}:\\
\;\;\;\;\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.9467168161159385 \cdot 10^{-200}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{\sqrt{\frac{t \cdot t}{x} \cdot \left(4 + \frac{4}{x}\right) + 2 \cdot \left(\left(t \cdot t + \frac{\ell}{\frac{x}{\frac{\ell}{x}}}\right) + \frac{\ell \cdot \ell}{x}\right)}}\\
\mathbf{elif}\;t \leq -1.0903340959230167 \cdot 10^{-263}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{-t \cdot \sqrt{2 \cdot \frac{1}{-1 + x} + 2 \cdot \frac{x}{-1 + x}}}\\
\mathbf{elif}\;t \leq 7.544659758222255 \cdot 10^{-07}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{\sqrt{\frac{t \cdot t}{x} \cdot \left(4 + \frac{4}{x}\right) + 2 \cdot \left(\left(t \cdot t + \frac{\ell}{\frac{x}{\frac{\ell}{x}}}\right) + \frac{\ell \cdot \ell}{x}\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 -1.1973600433919266e-60)
(/
(* t (sqrt 2.0))
(- (* t (sqrt (+ (* 2.0 (/ 1.0 (+ -1.0 x))) (* 2.0 (/ x (+ -1.0 x))))))))
(if (<= t -1.9467168161159385e-200)
(/
(* t (sqrt 2.0))
(sqrt
(+
(* (/ (* t t) x) (+ 4.0 (/ 4.0 x)))
(* 2.0 (+ (+ (* t t) (/ l (/ x (/ l x)))) (/ (* l l) x))))))
(if (<= t -1.0903340959230167e-263)
(/
(* t (sqrt 2.0))
(-
(* t (sqrt (+ (* 2.0 (/ 1.0 (+ -1.0 x))) (* 2.0 (/ x (+ -1.0 x))))))))
(if (<= t 7.544659758222255e-07)
(/
(* t (sqrt 2.0))
(sqrt
(+
(* (/ (* t t) x) (+ 4.0 (/ 4.0 x)))
(* 2.0 (+ (+ (* t t) (/ l (/ x (/ l x)))) (/ (* l l) x))))))
(/
(* 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 <= -1.1973600433919266e-60) {
tmp = (t * sqrt(2.0)) / -(t * sqrt((2.0 * (1.0 / (-1.0 + x))) + (2.0 * (x / (-1.0 + x)))));
} else if (t <= -1.9467168161159385e-200) {
tmp = (t * sqrt(2.0)) / sqrt((((t * t) / x) * (4.0 + (4.0 / x))) + (2.0 * (((t * t) + (l / (x / (l / x)))) + ((l * l) / x))));
} else if (t <= -1.0903340959230167e-263) {
tmp = (t * sqrt(2.0)) / -(t * sqrt((2.0 * (1.0 / (-1.0 + x))) + (2.0 * (x / (-1.0 + x)))));
} else if (t <= 7.544659758222255e-07) {
tmp = (t * sqrt(2.0)) / sqrt((((t * t) / x) * (4.0 + (4.0 / x))) + (2.0 * (((t * t) + (l / (x / (l / x)))) + ((l * l) / x))));
} 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 < -1.1973600433919266e-60 or -1.94671681611593846e-200 < t < -1.0903340959230167e-263Initial program 42.4
Taylor expanded around -inf 9.6
if -1.1973600433919266e-60 < t < -1.94671681611593846e-200 or -1.0903340959230167e-263 < t < 7.5446597582222554e-7Initial program 46.8
Taylor expanded around inf 21.3
Simplified21.3
rmApplied associate-/l*_binary64_2319.1
Simplified19.1
if 7.5446597582222554e-7 < t Initial program 41.4
Taylor expanded around inf 4.9
Final simplification11.5
herbie shell --seed 2021104
(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)))))