\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 := 2 \cdot \left(\ell \cdot \frac{\ell}{x} + t \cdot t\right)\\
t_2 := \sqrt{2} \cdot x\\
t_3 := t \cdot \sqrt{2}\\
t_4 := \frac{t_3}{\sqrt{\mathsf{fma}\left(4, t \cdot \frac{t}{x}, t_1\right)}}\\
t_5 := t \cdot \sqrt{\frac{2}{x - 1} + 2 \cdot \frac{x}{x - 1}}\\
t_6 := \frac{t_3}{-t_5}\\
t_7 := \sqrt{\sqrt{\mathsf{fma}\left(4, \frac{t \cdot t}{x}, t_1\right)}}\\
\mathbf{if}\;t \leq -2.6193255602417516 \cdot 10^{+39}:\\
\;\;\;\;t_6\\
\mathbf{elif}\;t \leq -1.5774899029279675 \cdot 10^{-158}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;t \leq -2.9428113665115564 \cdot 10^{-220}:\\
\;\;\;\;t_6\\
\mathbf{elif}\;t \leq 4.492559698933212 \cdot 10^{-187}:\\
\;\;\;\;\frac{t_3}{t_7 \cdot t_7}\\
\mathbf{elif}\;t \leq 5.771408473412508 \cdot 10^{-165}:\\
\;\;\;\;\frac{t_3}{\mathsf{fma}\left(t, \sqrt{2}, \mathsf{fma}\left(2, \frac{t}{t_2}, \frac{\ell \cdot \ell}{t \cdot t_2}\right)\right)}\\
\mathbf{elif}\;t \leq 1.355313699262091 \cdot 10^{+23}:\\
\;\;\;\;t_4\\
\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 (* 2.0 (+ (* l (/ l x)) (* t t))))
(t_2 (* (sqrt 2.0) x))
(t_3 (* t (sqrt 2.0)))
(t_4 (/ t_3 (sqrt (fma 4.0 (* t (/ t x)) t_1))))
(t_5 (* t (sqrt (+ (/ 2.0 (- x 1.0)) (* 2.0 (/ x (- x 1.0)))))))
(t_6 (/ t_3 (- t_5)))
(t_7 (sqrt (sqrt (fma 4.0 (/ (* t t) x) t_1)))))
(if (<= t -2.6193255602417516e+39)
t_6
(if (<= t -1.5774899029279675e-158)
t_4
(if (<= t -2.9428113665115564e-220)
t_6
(if (<= t 4.492559698933212e-187)
(/ t_3 (* t_7 t_7))
(if (<= t 5.771408473412508e-165)
(/
t_3
(fma t (sqrt 2.0) (fma 2.0 (/ t t_2) (/ (* l l) (* t t_2)))))
(if (<= t 1.355313699262091e+23) t_4 (/ 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 = 2.0 * ((l * (l / x)) + (t * t));
double t_2 = sqrt(2.0) * x;
double t_3 = t * sqrt(2.0);
double t_4 = t_3 / sqrt(fma(4.0, (t * (t / x)), t_1));
double t_5 = t * sqrt(((2.0 / (x - 1.0)) + (2.0 * (x / (x - 1.0)))));
double t_6 = t_3 / -t_5;
double t_7 = sqrt(sqrt(fma(4.0, ((t * t) / x), t_1)));
double tmp;
if (t <= -2.6193255602417516e+39) {
tmp = t_6;
} else if (t <= -1.5774899029279675e-158) {
tmp = t_4;
} else if (t <= -2.9428113665115564e-220) {
tmp = t_6;
} else if (t <= 4.492559698933212e-187) {
tmp = t_3 / (t_7 * t_7);
} else if (t <= 5.771408473412508e-165) {
tmp = t_3 / fma(t, sqrt(2.0), fma(2.0, (t / t_2), ((l * l) / (t * t_2))));
} else if (t <= 1.355313699262091e+23) {
tmp = t_4;
} else {
tmp = t_3 / t_5;
}
return tmp;
}



Bits error versus x



Bits error versus l



Bits error versus t
if t < -2.6193255602417516e39 or -1.5774899029279675e-158 < t < -2.94281136651155639e-220Initial program 46.9
Simplified46.9
Taylor expanded in t around -inf 8.4
Simplified8.4
if -2.6193255602417516e39 < t < -1.5774899029279675e-158 or 5.7714084734125084e-165 < t < 1.35531369926209095e23Initial program 30.6
Simplified30.6
Taylor expanded in x around inf 10.1
Simplified10.1
Applied *-un-lft-identity_binary6410.1
Applied times-frac_binary645.0
Simplified5.0
Applied *-un-lft-identity_binary645.0
Applied times-frac_binary645.0
Simplified5.0
if -2.94281136651155639e-220 < t < 4.49255969893321206e-187Initial program 62.8
Simplified62.8
Taylor expanded in x around inf 33.0
Simplified33.0
Applied *-un-lft-identity_binary6433.0
Applied times-frac_binary6431.8
Simplified31.8
Applied add-sqr-sqrt_binary6431.9
if 4.49255969893321206e-187 < t < 5.7714084734125084e-165Initial program 63.1
Simplified63.1
Taylor expanded in x around inf 18.1
Simplified18.1
if 1.35531369926209095e23 < t Initial program 41.8
Simplified41.8
Taylor expanded in t around inf 4.5
Simplified4.5
Final simplification9.6
herbie shell --seed 2022160
(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)))))