\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}
t_1 := t \cdot \sqrt{2}\\
\mathbf{if}\;t \leq -4.548734817694476 \cdot 10^{+75}:\\
\;\;\;\;\frac{t_1}{-t \cdot \sqrt{\frac{2}{x - 1} + 2 \cdot \frac{x}{x - 1}}}\\
\mathbf{elif}\;t \leq 3.3125137957761525 \cdot 10^{+49}:\\
\;\;\;\;\frac{t_1}{\sqrt{\mathsf{fma}\left(4, \frac{t \cdot t}{x}, 2 \cdot \left(t \cdot t + \frac{\ell \cdot \ell}{x}\right)\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{t_1}{t \cdot \sqrt{2 + \left(\frac{4}{x} + \left(\frac{4}{{x}^{3}} + \frac{4}{x \cdot x}\right)\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
(let* ((t_1 (* t (sqrt 2.0))))
(if (<= t -4.548734817694476e+75)
(/ t_1 (- (* t (sqrt (+ (/ 2.0 (- x 1.0)) (* 2.0 (/ x (- x 1.0))))))))
(if (<= t 3.3125137957761525e+49)
(/ t_1 (sqrt (fma 4.0 (/ (* t t) x) (* 2.0 (+ (* t t) (/ (* l l) x))))))
(/
t_1
(*
t
(sqrt
(+ 2.0 (+ (/ 4.0 x) (+ (/ 4.0 (pow x 3.0)) (/ 4.0 (* x 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 t_1 = t * sqrt(2.0);
double tmp;
if (t <= -4.548734817694476e+75) {
tmp = t_1 / -(t * sqrt((2.0 / (x - 1.0)) + (2.0 * (x / (x - 1.0)))));
} else if (t <= 3.3125137957761525e+49) {
tmp = t_1 / sqrt(fma(4.0, ((t * t) / x), (2.0 * ((t * t) + ((l * l) / x)))));
} else {
tmp = t_1 / (t * sqrt(2.0 + ((4.0 / x) + ((4.0 / pow(x, 3.0)) + (4.0 / (x * x))))));
}
return tmp;
}



Bits error versus x



Bits error versus l



Bits error versus t
if t < -4.5487348176944761e75Initial program 47.9
Simplified47.9
Taylor expanded in t around -inf 3.0
Simplified3.0
if -4.5487348176944761e75 < t < 3.31251379577615254e49Initial program 40.5
Simplified40.5
Taylor expanded in x around inf 18.2
Simplified18.2
if 3.31251379577615254e49 < t Initial program 44.9
Simplified44.9
Taylor expanded in x around inf 43.8
Simplified43.8
Taylor expanded in t around inf 4.3
Simplified4.3
Final simplification11.4
herbie shell --seed 2022067
(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)))))