\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 -2.23509062901184 \cdot 10^{+102}:\\
\;\;\;\;\frac{t_2}{-t_1}\\
\mathbf{else}:\\
\;\;\;\;\begin{array}{l}
t_3 := \frac{t \cdot t}{x}\\
t_4 := \frac{\ell \cdot \ell}{x}\\
\mathbf{if}\;t \leq 7.8810070464843 \cdot 10^{-291}:\\
\;\;\;\;\frac{t_2}{\sqrt{\mathsf{fma}\left(4, t_3, 2 \cdot \left(t \cdot t + t_4\right)\right)}}\\
\mathbf{elif}\;t \leq 3.944741423570907 \cdot 10^{-183}:\\
\;\;\;\;\begin{array}{l}
t_5 := \sqrt{2} \cdot x\\
\frac{t_2}{\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 1.180657066157189 \cdot 10^{+83}:\\
\;\;\;\;\frac{t_2}{\sqrt{\mathsf{fma}\left(\frac{t \cdot t}{x \cdot x}, 4, \mathsf{fma}\left(t_3, 4, \mathsf{fma}\left(\frac{t \cdot t}{{x}^{3}}, 4, \mathsf{fma}\left(2, \frac{\ell \cdot \ell}{x \cdot x}, 2 \cdot \left(\frac{\ell \cdot \ell}{{x}^{3}} + \mathsf{fma}\left(t, t, t_4\right)\right)\right)\right)\right)\right)}}\\
\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 -2.23509062901184e+102)
(/ t_2 (- t_1))
(let* ((t_3 (/ (* t t) x)) (t_4 (/ (* l l) x)))
(if (<= t 7.8810070464843e-291)
(/ t_2 (sqrt (fma 4.0 t_3 (* 2.0 (+ (* t t) t_4)))))
(if (<= t 3.944741423570907e-183)
(let* ((t_5 (* (sqrt 2.0) x)))
(/
t_2
(fma t (sqrt 2.0) (fma 2.0 (/ t t_5) (/ (* l l) (* t t_5))))))
(if (<= t 1.180657066157189e+83)
(/
t_2
(sqrt
(fma
(/ (* t t) (* x x))
4.0
(fma
t_3
4.0
(fma
(/ (* t t) (pow x 3.0))
4.0
(fma
2.0
(/ (* l l) (* x x))
(* 2.0 (+ (/ (* l l) (pow x 3.0)) (fma t t t_4)))))))))
(/ 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 <= -2.23509062901184e+102) {
tmp = t_2 / -t_1;
} else {
double t_3 = (t * t) / x;
double t_4 = (l * l) / x;
double tmp_1;
if (t <= 7.8810070464843e-291) {
tmp_1 = t_2 / sqrt(fma(4.0, t_3, (2.0 * ((t * t) + t_4))));
} else if (t <= 3.944741423570907e-183) {
double t_5 = sqrt(2.0) * x;
tmp_1 = t_2 / fma(t, sqrt(2.0), fma(2.0, (t / t_5), ((l * l) / (t * t_5))));
} else if (t <= 1.180657066157189e+83) {
tmp_1 = t_2 / sqrt(fma(((t * t) / (x * x)), 4.0, fma(t_3, 4.0, fma(((t * t) / pow(x, 3.0)), 4.0, fma(2.0, ((l * l) / (x * x)), (2.0 * (((l * l) / pow(x, 3.0)) + fma(t, t, t_4))))))));
} 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 < -2.23509062901183995e102Initial program 51.0
Simplified51.0
Taylor expanded in t around -inf 2.6
Simplified2.6
if -2.23509062901183995e102 < t < 7.8810070464843001e-291Initial program 39.2
Simplified39.2
Taylor expanded in x around inf 17.6
Simplified17.6
if 7.8810070464843001e-291 < t < 3.9447414235709069e-183Initial program 62.9
Simplified62.9
Taylor expanded in x around inf 25.4
Simplified25.4
if 3.9447414235709069e-183 < t < 1.1806570661571889e83Initial program 29.3
Simplified29.3
Taylor expanded in x around inf 12.8
Simplified12.8
Applied *-un-lft-identity_binary6412.8
Applied sqrt-prod_binary6412.8
Simplified12.8
Simplified12.8
if 1.1806570661571889e83 < t Initial program 47.3
Simplified47.3
Taylor expanded in t around inf 2.4
Simplified2.4
Final simplification10.8
herbie shell --seed 2021275
(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)))))