\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 := 2 + \frac{4}{x}\\
t_3 := -t \cdot \sqrt{t_2}\\
\mathbf{if}\;t \leq -3.102563437149407 \cdot 10^{+67}:\\
\;\;\;\;\frac{t_1}{t_3}\\
\mathbf{else}:\\
\;\;\;\;\begin{array}{l}
t_4 := 4 \cdot \frac{t \cdot t}{x}\\
\mathbf{if}\;t \leq -1.2602368096531304 \cdot 10^{-161}:\\
\;\;\;\;\frac{t_1}{\sqrt{t_4 + 2 \cdot \left(t \cdot t + \ell \cdot \frac{\ell}{x}\right)}}\\
\mathbf{elif}\;t \leq -2.374125310995121 \cdot 10^{-282}:\\
\;\;\;\;\frac{t_1}{t_3 - \frac{\ell \cdot \ell}{t \cdot x} \cdot \sqrt{\frac{1}{t_2}}}\\
\mathbf{elif}\;t \leq 5.838507140043639 \cdot 10^{-275}:\\
\;\;\;\;\begin{array}{l}
t_5 := \sqrt{\sqrt{t_4 + 2 \cdot \left(t \cdot t + \frac{\ell \cdot \ell}{x}\right)}}\\
\frac{t_1}{t_5 \cdot t_5}
\end{array}\\
\mathbf{elif}\;t \leq 2.9134571555877657 \cdot 10^{-213}:\\
\;\;\;\;\begin{array}{l}
t_6 := \sqrt{2} \cdot x\\
\frac{t_1}{t_1 + \left(2 \cdot \frac{t}{t_6} + \frac{\ell \cdot \ell}{t \cdot t_6}\right)}
\end{array}\\
\mathbf{elif}\;t \leq 6.236030065229034 \cdot 10^{+130}:\\
\;\;\;\;\frac{t_1}{\sqrt{t_4 + 2 \cdot \left(t \cdot t + \frac{\ell}{\sqrt[3]{x} \cdot \sqrt[3]{x}} \cdot \frac{\ell}{\sqrt[3]{x}}\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{t_1}{t \cdot \sqrt{\frac{2}{x - 1} + 2 \cdot \frac{x}{x - 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)))
(t_2 (+ 2.0 (/ 4.0 x)))
(t_3 (- (* t (sqrt t_2)))))
(if (<= t -3.102563437149407e+67)
(/ t_1 t_3)
(let* ((t_4 (* 4.0 (/ (* t t) x))))
(if (<= t -1.2602368096531304e-161)
(/ t_1 (sqrt (+ t_4 (* 2.0 (+ (* t t) (* l (/ l x)))))))
(if (<= t -2.374125310995121e-282)
(/ t_1 (- t_3 (* (/ (* l l) (* t x)) (sqrt (/ 1.0 t_2)))))
(if (<= t 5.838507140043639e-275)
(let* ((t_5
(sqrt (sqrt (+ t_4 (* 2.0 (+ (* t t) (/ (* l l) x))))))))
(/ t_1 (* t_5 t_5)))
(if (<= t 2.9134571555877657e-213)
(let* ((t_6 (* (sqrt 2.0) x)))
(/ t_1 (+ t_1 (+ (* 2.0 (/ t t_6)) (/ (* l l) (* t t_6))))))
(if (<= t 6.236030065229034e+130)
(/
t_1
(sqrt
(+
t_4
(*
2.0
(+
(* t t)
(* (/ l (* (cbrt x) (cbrt x))) (/ l (cbrt x))))))))
(/
t_1
(*
t
(sqrt
(+ (/ 2.0 (- x 1.0)) (* 2.0 (/ x (- x 1.0))))))))))))))))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 = 2.0 + (4.0 / x);
double t_3 = -(t * sqrt(t_2));
double tmp;
if (t <= -3.102563437149407e+67) {
tmp = t_1 / t_3;
} else {
double t_4 = 4.0 * ((t * t) / x);
double tmp_1;
if (t <= -1.2602368096531304e-161) {
tmp_1 = t_1 / sqrt(t_4 + (2.0 * ((t * t) + (l * (l / x)))));
} else if (t <= -2.374125310995121e-282) {
tmp_1 = t_1 / (t_3 - (((l * l) / (t * x)) * sqrt(1.0 / t_2)));
} else if (t <= 5.838507140043639e-275) {
double t_5 = sqrt(sqrt(t_4 + (2.0 * ((t * t) + ((l * l) / x)))));
tmp_1 = t_1 / (t_5 * t_5);
} else if (t <= 2.9134571555877657e-213) {
double t_6 = sqrt(2.0) * x;
tmp_1 = t_1 / (t_1 + ((2.0 * (t / t_6)) + ((l * l) / (t * t_6))));
} else if (t <= 6.236030065229034e+130) {
tmp_1 = t_1 / sqrt(t_4 + (2.0 * ((t * t) + ((l / (cbrt(x) * cbrt(x))) * (l / cbrt(x))))));
} else {
tmp_1 = t_1 / (t * sqrt((2.0 / (x - 1.0)) + (2.0 * (x / (x - 1.0)))));
}
tmp = tmp_1;
}
return tmp;
}



Bits error versus x



Bits error versus l



Bits error versus t
Results
if t < -3.10256343714940727e67Initial program 47.0
Taylor expanded around inf 45.9
Simplified45.9
Taylor expanded around -inf 3.7
Simplified3.7
if -3.10256343714940727e67 < t < -1.2602368096531304e-161Initial program 28.8
Taylor expanded around inf 10.4
Simplified10.4
rmApplied *-un-lft-identity_binary6410.4
Applied times-frac_binary644.8
Simplified4.8
if -1.2602368096531304e-161 < t < -2.374125310995121e-282Initial program 63.0
Taylor expanded around inf 36.1
Simplified36.1
Taylor expanded around -inf 23.1
Simplified23.1
if -2.374125310995121e-282 < t < 5.83850714004363907e-275Initial program 63.2
Taylor expanded around inf 31.3
Simplified31.3
rmApplied add-sqr-sqrt_binary6431.3
if 5.83850714004363907e-275 < t < 2.91345715558776566e-213Initial program 62.9
Taylor expanded around inf 26.6
Simplified26.6
if 2.91345715558776566e-213 < t < 6.23603006522903403e130Initial program 31.4
Taylor expanded around inf 13.8
Simplified13.8
rmApplied add-cube-cbrt_binary6413.9
Applied times-frac_binary648.5
if 6.23603006522903403e130 < t Initial program 56.2
Taylor expanded around inf 1.7
Simplified1.7
Final simplification8.2
herbie shell --seed 2021202
(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)))))