\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{x}{x - 1}\\
\mathbf{if}\;t \leq -3.794059740456262 \cdot 10^{+153}:\\
\;\;\;\;-\sqrt{2} \cdot \sqrt{\frac{0.5}{\frac{1}{x - 1} + t_1}}\\
\mathbf{else}:\\
\;\;\;\;\begin{array}{l}
t_2 := t \cdot \sqrt{2}\\
t_3 := 4 \cdot \frac{t \cdot t}{x}\\
\mathbf{if}\;t \leq -1.2938403409931352 \cdot 10^{-164}:\\
\;\;\;\;\begin{array}{l}
t_4 := \sqrt{t \cdot t + \ell \cdot \frac{\ell}{x}}\\
\frac{t_2}{\sqrt{t_3 + 2 \cdot \left(t_4 \cdot t_4\right)}}
\end{array}\\
\mathbf{elif}\;t \leq -3.5699458991278936 \cdot 10^{-224}:\\
\;\;\;\;\frac{t_2}{-t \cdot \sqrt{2 + \frac{4}{x}}}\\
\mathbf{elif}\;t \leq 3.102085561218943 \cdot 10^{-261}:\\
\;\;\;\;\frac{t_2}{-\left(\sqrt{2} \cdot \ell\right) \cdot \sqrt{\frac{1}{x}}}\\
\mathbf{elif}\;t \leq 5.6551231679193885 \cdot 10^{+121}:\\
\;\;\;\;\frac{t_2}{\sqrt{t_3 + 2 \cdot \left(t \cdot t + \frac{\ell}{\frac{x}{\ell}}\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{t_2}{t \cdot \sqrt{\frac{2}{x - 1} + 2 \cdot 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 (/ x (- x 1.0))))
(if (<= t -3.794059740456262e+153)
(- (* (sqrt 2.0) (sqrt (/ 0.5 (+ (/ 1.0 (- x 1.0)) t_1)))))
(let* ((t_2 (* t (sqrt 2.0))) (t_3 (* 4.0 (/ (* t t) x))))
(if (<= t -1.2938403409931352e-164)
(let* ((t_4 (sqrt (+ (* t t) (* l (/ l x))))))
(/ t_2 (sqrt (+ t_3 (* 2.0 (* t_4 t_4))))))
(if (<= t -3.5699458991278936e-224)
(/ t_2 (- (* t (sqrt (+ 2.0 (/ 4.0 x))))))
(if (<= t 3.102085561218943e-261)
(/ t_2 (- (* (* (sqrt 2.0) l) (sqrt (/ 1.0 x)))))
(if (<= t 5.6551231679193885e+121)
(/ t_2 (sqrt (+ t_3 (* 2.0 (+ (* t t) (/ l (/ x l)))))))
(/ t_2 (* t (sqrt (+ (/ 2.0 (- x 1.0)) (* 2.0 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 = x / (x - 1.0);
double tmp;
if (t <= -3.794059740456262e+153) {
tmp = -(sqrt(2.0) * sqrt(0.5 / ((1.0 / (x - 1.0)) + t_1)));
} else {
double t_2 = t * sqrt(2.0);
double t_3 = 4.0 * ((t * t) / x);
double tmp_1;
if (t <= -1.2938403409931352e-164) {
double t_4_2 = sqrt((t * t) + (l * (l / x)));
tmp_1 = t_2 / sqrt(t_3 + (2.0 * (t_4_2 * t_4_2)));
} else if (t <= -3.5699458991278936e-224) {
tmp_1 = t_2 / -(t * sqrt(2.0 + (4.0 / x)));
} else if (t <= 3.102085561218943e-261) {
tmp_1 = t_2 / -((sqrt(2.0) * l) * sqrt(1.0 / x));
} else if (t <= 5.6551231679193885e+121) {
tmp_1 = t_2 / sqrt(t_3 + (2.0 * ((t * t) + (l / (x / l)))));
} else {
tmp_1 = t_2 / (t * sqrt((2.0 / (x - 1.0)) + (2.0 * t_1)));
}
tmp = tmp_1;
}
return tmp;
}



Bits error versus x



Bits error versus l



Bits error versus t
Results
if t < -3.7940597404562616e153Initial program 62.4
Taylor expanded around -inf 2.4
Simplified2.4
if -3.7940597404562616e153 < t < -1.2938403409931352e-164Initial program 24.6
Taylor expanded around inf 10.9
Simplified10.9
rmApplied *-un-lft-identity_binary6410.9
Applied times-frac_binary645.5
Simplified5.5
rmApplied add-sqr-sqrt_binary645.5
if -1.2938403409931352e-164 < t < -3.5699458991278936e-224Initial program 63.2
Taylor expanded around inf 36.2
Simplified36.2
Taylor expanded around -inf 33.1
Simplified33.1
if -3.5699458991278936e-224 < t < 3.10208556121894307e-261Initial program 63.1
Taylor expanded around inf 30.9
Simplified30.9
Taylor expanded around -inf 32.5
Simplified32.5
if 3.10208556121894307e-261 < t < 5.65512316791938847e121Initial program 33.2
Taylor expanded around inf 15.5
Simplified15.5
rmApplied associate-/l*_binary6410.7
if 5.65512316791938847e121 < t Initial program 54.1
Taylor expanded around inf 2.1
Simplified2.1
Final simplification9.1
herbie shell --seed 2021198
(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)))))