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