\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}
\mathbf{if}\;t \leq -7.870811036512242 \cdot 10^{-49}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{-t \cdot \sqrt{2 \cdot \frac{1}{-1 + x} + 2 \cdot \frac{x}{-1 + x}}}\\
\mathbf{elif}\;t \leq -2.5955154161613975 \cdot 10^{-185}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{\sqrt{2 \cdot \frac{\ell \cdot \ell}{x} + \left(4 \cdot \frac{t \cdot t}{x} + \left(2 \cdot \frac{\ell \cdot \ell}{{x}^{3}} + \left(2 \cdot \left(t \cdot t + \sqrt[3]{\frac{\ell \cdot \ell}{x \cdot x}} \cdot \left(\sqrt[3]{\frac{\ell \cdot \ell}{x \cdot x}} \cdot \sqrt[3]{\frac{\ell \cdot \ell}{x \cdot x}}\right)\right) + 4 \cdot \left(\frac{t \cdot t}{{x}^{3}} + \frac{t \cdot t}{x \cdot x}\right)\right)\right)\right)}}\\
\mathbf{elif}\;t \leq -5.984746586445027 \cdot 10^{-259}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{-t \cdot \sqrt{2 \cdot \frac{1}{-1 + x} + 2 \cdot \frac{x}{-1 + x}}}\\
\mathbf{elif}\;t \leq 1.297267949586402 \cdot 10^{-168}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{t \cdot \sqrt{2} + \left(2 \cdot \frac{t}{\sqrt{2} \cdot x} + \frac{\ell \cdot \ell}{t \cdot \left(\sqrt{2} \cdot x\right)}\right)}\\
\mathbf{elif}\;t \leq 1.4508059836798438 \cdot 10^{+63}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{\sqrt{2 \cdot \frac{{\ell}^{2}}{x} + \left(4 \cdot \frac{{t}^{2}}{x} + \left(4 \cdot \frac{{t}^{2}}{{x}^{2}} + \left(2 \cdot {t}^{2} + 2 \cdot \frac{{\ell}^{2}}{{x}^{2}}\right)\right)\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{t \cdot \sqrt{2 \cdot \frac{1}{-1 + x} + 2 \cdot \frac{x}{-1 + x}}}\\
\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
(if (<= t -7.870811036512242e-49)
(/
(* t (sqrt 2.0))
(- (* t (sqrt (+ (* 2.0 (/ 1.0 (+ -1.0 x))) (* 2.0 (/ x (+ -1.0 x))))))))
(if (<= t -2.5955154161613975e-185)
(/
(* t (sqrt 2.0))
(sqrt
(+
(* 2.0 (/ (* l l) x))
(+
(* 4.0 (/ (* t t) x))
(+
(* 2.0 (/ (* l l) (pow x 3.0)))
(+
(*
2.0
(+
(* t t)
(*
(cbrt (/ (* l l) (* x x)))
(* (cbrt (/ (* l l) (* x x))) (cbrt (/ (* l l) (* x x)))))))
(* 4.0 (+ (/ (* t t) (pow x 3.0)) (/ (* t t) (* x x))))))))))
(if (<= t -5.984746586445027e-259)
(/
(* t (sqrt 2.0))
(-
(* t (sqrt (+ (* 2.0 (/ 1.0 (+ -1.0 x))) (* 2.0 (/ x (+ -1.0 x))))))))
(if (<= t 1.297267949586402e-168)
(/
(* t (sqrt 2.0))
(+
(* t (sqrt 2.0))
(+
(* 2.0 (/ t (* (sqrt 2.0) x)))
(/ (* l l) (* t (* (sqrt 2.0) x))))))
(if (<= t 1.4508059836798438e+63)
(/
(* t (sqrt 2.0))
(sqrt
(+
(* 2.0 (/ (pow l 2.0) x))
(+
(* 4.0 (/ (pow t 2.0) x))
(+
(* 4.0 (/ (pow t 2.0) (pow x 2.0)))
(+
(* 2.0 (pow t 2.0))
(* 2.0 (/ (pow l 2.0) (pow x 2.0)))))))))
(/
(* t (sqrt 2.0))
(*
t
(sqrt
(+ (* 2.0 (/ 1.0 (+ -1.0 x))) (* 2.0 (/ x (+ -1.0 x)))))))))))))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 tmp;
if (t <= -7.870811036512242e-49) {
tmp = (t * sqrt(2.0)) / -(t * sqrt((2.0 * (1.0 / (-1.0 + x))) + (2.0 * (x / (-1.0 + x)))));
} else if (t <= -2.5955154161613975e-185) {
tmp = (t * sqrt(2.0)) / sqrt((2.0 * ((l * l) / x)) + ((4.0 * ((t * t) / x)) + ((2.0 * ((l * l) / pow(x, 3.0))) + ((2.0 * ((t * t) + (cbrt((l * l) / (x * x)) * (cbrt((l * l) / (x * x)) * cbrt((l * l) / (x * x)))))) + (4.0 * (((t * t) / pow(x, 3.0)) + ((t * t) / (x * x))))))));
} else if (t <= -5.984746586445027e-259) {
tmp = (t * sqrt(2.0)) / -(t * sqrt((2.0 * (1.0 / (-1.0 + x))) + (2.0 * (x / (-1.0 + x)))));
} else if (t <= 1.297267949586402e-168) {
tmp = (t * sqrt(2.0)) / ((t * sqrt(2.0)) + ((2.0 * (t / (sqrt(2.0) * x))) + ((l * l) / (t * (sqrt(2.0) * x)))));
} else if (t <= 1.4508059836798438e+63) {
tmp = (t * sqrt(2.0)) / sqrt((2.0 * (pow(l, 2.0) / x)) + ((4.0 * (pow(t, 2.0) / x)) + ((4.0 * (pow(t, 2.0) / pow(x, 2.0))) + ((2.0 * pow(t, 2.0)) + (2.0 * (pow(l, 2.0) / pow(x, 2.0)))))));
} else {
tmp = (t * sqrt(2.0)) / (t * sqrt((2.0 * (1.0 / (-1.0 + x))) + (2.0 * (x / (-1.0 + x)))));
}
return tmp;
}



Bits error versus x



Bits error versus l



Bits error versus t
Results
if t < -7.8708110365122422e-49 or -2.59551541616139748e-185 < t < -5.98474658644502708e-259Initial program 43.4
Taylor expanded around -inf 10.7
if -7.8708110365122422e-49 < t < -2.59551541616139748e-185Initial program 38.7
Taylor expanded around inf 17.1
Simplified17.1
rmApplied add-cube-cbrt_binary6417.1
if -5.98474658644502708e-259 < t < 1.29726794958640211e-168Initial program 62.6
Taylor expanded around inf 30.2
Simplified30.2
if 1.29726794958640211e-168 < t < 1.45080598367984385e63Initial program 29.0
Taylor expanded around inf 11.1
if 1.45080598367984385e63 < t Initial program 46.5
Taylor expanded around inf 3.4
Final simplification11.8
herbie shell --seed 2021113
(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)))))