\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{\frac{2}{x - 1} + 2 \cdot \frac{x}{x - 1}}\\
t_2 := t \cdot \sqrt{2}\\
\mathbf{if}\;t \leq -1.7789831318513475 \cdot 10^{-12}:\\
\;\;\;\;\frac{t_2}{-t_1}\\
\mathbf{else}:\\
\;\;\;\;\begin{array}{l}
t_3 := \frac{t_2}{\sqrt{\mathsf{fma}\left(4, \frac{t \cdot t}{x}, 2 \cdot \left(t \cdot t + \frac{\ell \cdot \ell}{x}\right)\right)}}\\
\mathbf{if}\;t \leq 5.746839589054363 \cdot 10^{-281}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq 4.394123494096578 \cdot 10^{-200}:\\
\;\;\;\;\begin{array}{l}
t_4 := \sqrt{2} \cdot x\\
\frac{t_2}{\mathsf{fma}\left(t, \sqrt{2}, \mathsf{fma}\left(2, \frac{t}{t_4}, \frac{\ell \cdot \ell}{t \cdot t_4}\right)\right)}
\end{array}\\
\mathbf{elif}\;t \leq 3.4016621676448906 \cdot 10^{+73}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;\frac{t_2}{t_1}\\
\end{array}\\
\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 (- x 1.0)) (* 2.0 (/ x (- x 1.0)))))))
(t_2 (* t (sqrt 2.0))))
(if (<= t -1.7789831318513475e-12)
(/ t_2 (- t_1))
(let* ((t_3
(/
t_2
(sqrt
(fma 4.0 (/ (* t t) x) (* 2.0 (+ (* t t) (/ (* l l) x))))))))
(if (<= t 5.746839589054363e-281)
t_3
(if (<= t 4.394123494096578e-200)
(let* ((t_4 (* (sqrt 2.0) x)))
(/
t_2
(fma t (sqrt 2.0) (fma 2.0 (/ t t_4) (/ (* l l) (* t t_4))))))
(if (<= t 3.4016621676448906e+73) t_3 (/ t_2 t_1))))))))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 / (x - 1.0)) + (2.0 * (x / (x - 1.0))));
double t_2 = t * sqrt(2.0);
double tmp;
if (t <= -1.7789831318513475e-12) {
tmp = t_2 / -t_1;
} else {
double t_3 = t_2 / sqrt(fma(4.0, ((t * t) / x), (2.0 * ((t * t) + ((l * l) / x)))));
double tmp_1;
if (t <= 5.746839589054363e-281) {
tmp_1 = t_3;
} else if (t <= 4.394123494096578e-200) {
double t_4 = sqrt(2.0) * x;
tmp_1 = t_2 / fma(t, sqrt(2.0), fma(2.0, (t / t_4), ((l * l) / (t * t_4))));
} else if (t <= 3.4016621676448906e+73) {
tmp_1 = t_3;
} else {
tmp_1 = t_2 / t_1;
}
tmp = tmp_1;
}
return tmp;
}



Bits error versus x



Bits error versus l



Bits error versus t
if t < -1.7789831318513475e-12Initial program 41.5
Simplified41.5
Taylor expanded in t around -inf 5.2
Simplified5.2
if -1.7789831318513475e-12 < t < 5.74683958905436263e-281 or 4.39412349409657786e-200 < t < 3.40166216764489058e73Initial program 40.3
Simplified40.3
Taylor expanded in x around inf 17.9
Simplified17.9
if 5.74683958905436263e-281 < t < 4.39412349409657786e-200Initial program 62.5
Simplified62.5
Taylor expanded in x around inf 38.7
Simplified38.7
Taylor expanded in x around inf 23.6
Simplified23.6
if 3.40166216764489058e73 < t Initial program 46.6
Simplified46.6
Taylor expanded in t around inf 2.9
Simplified2.9
Final simplification11.1
herbie shell --seed 2022097
(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)))))