\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{\frac{2}{x - 1} + 2 \cdot \frac{x}{x - 1}}}\\
\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 + \frac{\ell \cdot \ell}{x \cdot x}\right) + 4 \cdot \left(\frac{t \cdot t}{x \cdot x} + \frac{\frac{t \cdot t}{x \cdot x}}{x}\right)\right)\right)\right)}}\\
\mathbf{elif}\;t \leq -5.984746586445027 \cdot 10^{-259}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{-t \cdot \sqrt{\frac{2}{x - 1} + 2 \cdot \frac{x}{x - 1}}}\\
\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 \cdot \ell}{x} + \left(2 \cdot \left(t \cdot t + \frac{\ell \cdot \ell}{x \cdot x}\right) + 4 \cdot \left(\frac{t \cdot t}{x} + \frac{t \cdot t}{x \cdot x}\right)\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{t \cdot \sqrt{\frac{2}{x - 1} + 2 \cdot \frac{x}{x - 1}}}\\
\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 (- x 1.0)) (* 2.0 (/ x (- x 1.0))))))))
(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) (/ (* l l) (* x x))))
(* 4.0 (+ (/ (* t t) (* x x)) (/ (/ (* t t) (* x x)) x)))))))))
(if (<= t -5.984746586445027e-259)
(/
(* t (sqrt 2.0))
(- (* t (sqrt (+ (/ 2.0 (- x 1.0)) (* 2.0 (/ x (- x 1.0))))))))
(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 (/ (* l l) x))
(+
(* 2.0 (+ (* t t) (/ (* l l) (* x x))))
(* 4.0 (+ (/ (* t t) x) (/ (* t t) (* x x))))))))
(/
(* t (sqrt 2.0))
(* 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 tmp;
if (t <= -7.870811036512242e-49) {
tmp = (t * sqrt(2.0)) / -(t * sqrt((2.0 / (x - 1.0)) + (2.0 * (x / (x - 1.0)))));
} 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) + ((l * l) / (x * x)))) + (4.0 * (((t * t) / (x * x)) + (((t * t) / (x * x)) / x)))))));
} else if (t <= -5.984746586445027e-259) {
tmp = (t * sqrt(2.0)) / -(t * sqrt((2.0 / (x - 1.0)) + (2.0 * (x / (x - 1.0)))));
} 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 * ((l * l) / x)) + ((2.0 * ((t * t) + ((l * l) / (x * x)))) + (4.0 * (((t * t) / x) + ((t * t) / (x * x))))));
} else {
tmp = (t * sqrt(2.0)) / (t * sqrt((2.0 / (x - 1.0)) + (2.0 * (x / (x - 1.0)))));
}
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
Simplified10.7
if -7.8708110365122422e-49 < t < -2.59551541616139748e-185Initial program 38.7
Taylor expanded around inf 17.1
Simplified17.1
rmApplied unpow3_binary6417.1
Applied associate-/r*_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
Simplified11.1
if 1.45080598367984385e63 < t Initial program 46.5
Taylor expanded around inf 3.4
Simplified3.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)))))