\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}\\
t_2 := t \cdot \sqrt{\frac{2}{x - 1} + 2 \cdot \frac{x}{x - 1}}\\
\mathbf{if}\;t \leq -2.3406614659731964 \cdot 10^{-32}:\\
\;\;\;\;\frac{t_1}{-t_2}\\
\mathbf{else}:\\
\;\;\;\;\begin{array}{l}
t_3 := \frac{\ell \cdot \ell}{x}\\
t_4 := \frac{t \cdot t}{x}\\
\mathbf{if}\;t \leq 4.0189218111892443 \cdot 10^{-296}:\\
\;\;\;\;\frac{t_1}{{\left(\sqrt{\sqrt{\mathsf{fma}\left(4, {\left(\frac{t}{x}\right)}^{2}, \mathsf{fma}\left(4, t_4, \mathsf{fma}\left(4, \frac{t \cdot t}{{x}^{3}}, \mathsf{fma}\left(2, {\left(\frac{\ell}{x}\right)}^{2}, \mathsf{fma}\left(2, \frac{\ell}{\frac{{x}^{3}}{\ell}}, 2 \cdot \mathsf{fma}\left(t, t, t_3\right)\right)\right)\right)\right)\right)}}\right)}^{2}}\\
\mathbf{elif}\;t \leq 4.26980358877847 \cdot 10^{-230}:\\
\;\;\;\;\begin{array}{l}
t_5 := \sqrt{2} \cdot x\\
\frac{t_1}{\mathsf{fma}\left(t, \sqrt{2}, \mathsf{fma}\left(2, \frac{t}{t_5}, \frac{\ell \cdot \ell}{t \cdot t_5}\right)\right)}
\end{array}\\
\mathbf{elif}\;t \leq 2.4426192567774815 \cdot 10^{-39}:\\
\;\;\;\;\frac{t_1}{\sqrt{\mathsf{fma}\left(4, t_4, 2 \cdot \left(t \cdot t + t_3\right)\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{t_1}{t_2}\\
\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)))
(t_2 (* t (sqrt (+ (/ 2.0 (- x 1.0)) (* 2.0 (/ x (- x 1.0))))))))
(if (<= t -2.3406614659731964e-32)
(/ t_1 (- t_2))
(let* ((t_3 (/ (* l l) x)) (t_4 (/ (* t t) x)))
(if (<= t 4.0189218111892443e-296)
(/
t_1
(pow
(sqrt
(sqrt
(fma
4.0
(pow (/ t x) 2.0)
(fma
4.0
t_4
(fma
4.0
(/ (* t t) (pow x 3.0))
(fma
2.0
(pow (/ l x) 2.0)
(fma 2.0 (/ l (/ (pow x 3.0) l)) (* 2.0 (fma t t t_3)))))))))
2.0))
(if (<= t 4.26980358877847e-230)
(let* ((t_5 (* (sqrt 2.0) x)))
(/
t_1
(fma t (sqrt 2.0) (fma 2.0 (/ t t_5) (/ (* l l) (* t t_5))))))
(if (<= t 2.4426192567774815e-39)
(/ t_1 (sqrt (fma 4.0 t_4 (* 2.0 (+ (* t t) t_3)))))
(/ t_1 t_2))))))))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 t_2 = t * sqrt((2.0 / (x - 1.0)) + (2.0 * (x / (x - 1.0))));
double tmp;
if (t <= -2.3406614659731964e-32) {
tmp = t_1 / -t_2;
} else {
double t_3 = (l * l) / x;
double t_4 = (t * t) / x;
double tmp_1;
if (t <= 4.0189218111892443e-296) {
tmp_1 = t_1 / pow(sqrt(sqrt(fma(4.0, pow((t / x), 2.0), fma(4.0, t_4, fma(4.0, ((t * t) / pow(x, 3.0)), fma(2.0, pow((l / x), 2.0), fma(2.0, (l / (pow(x, 3.0) / l)), (2.0 * fma(t, t, t_3))))))))), 2.0);
} else if (t <= 4.26980358877847e-230) {
double t_5 = sqrt(2.0) * x;
tmp_1 = t_1 / fma(t, sqrt(2.0), fma(2.0, (t / t_5), ((l * l) / (t * t_5))));
} else if (t <= 2.4426192567774815e-39) {
tmp_1 = t_1 / sqrt(fma(4.0, t_4, (2.0 * ((t * t) + t_3))));
} else {
tmp_1 = t_1 / t_2;
}
tmp = tmp_1;
}
return tmp;
}



Bits error versus x



Bits error versus l



Bits error versus t
if t < -2.34066146597319637e-32Initial program 40.4
Simplified40.4
Taylor expanded in t around -inf 5.9
Simplified5.9
if -2.34066146597319637e-32 < t < 4.01892181118924432e-296Initial program 48.4
Simplified48.4
Taylor expanded in x around inf 24.7
Simplified24.7
Applied egg24.8
Applied egg21.2
if 4.01892181118924432e-296 < t < 4.26980358877847e-230Initial program 62.6
Simplified62.6
Taylor expanded in x around inf 25.7
Simplified25.7
if 4.26980358877847e-230 < t < 2.4426192567774815e-39Initial program 42.6
Simplified42.6
Taylor expanded in x around inf 18.9
Simplified18.9
if 2.4426192567774815e-39 < t Initial program 39.8
Simplified39.8
Taylor expanded in t around inf 6.1
Simplified6.1
Final simplification11.6
herbie shell --seed 2022125
(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)))))