\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 -2.774724760257283 \cdot 10^{+128}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{\frac{t}{\sqrt{2} \cdot \left(x \cdot x\right)} - \left(t \cdot \sqrt{2} + \frac{2}{\sqrt{2}} \cdot \left(\frac{t}{x \cdot x} + \frac{t}{x}\right)\right)}\\
\mathbf{elif}\;t \leq -1.02625065655815 \cdot 10^{-165}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{\sqrt{4 \cdot \frac{t \cdot t}{x} + 2 \cdot \left(t \cdot t + \frac{\ell}{\frac{x}{\ell}}\right)}}\\
\mathbf{elif}\;t \leq -6.499970412284675 \cdot 10^{-208}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{\frac{\frac{t}{x}}{\sqrt{2} \cdot x} - \left(t \cdot \sqrt{2} + 2 \cdot \frac{t}{\sqrt{2} \cdot x}\right)}\\
\mathbf{elif}\;t \leq 3.6293279203079994 \cdot 10^{+100}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{\sqrt{4 \cdot \frac{t \cdot t}{x} + 2 \cdot \left(t \cdot t + \frac{\ell}{\frac{x}{\ell}}\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{\frac{2}{\sqrt{2}} \cdot \left(\frac{t}{x \cdot x} + \frac{t}{x}\right) + \left(t \cdot \sqrt{2} - \frac{t}{\sqrt{2} \cdot \left(x \cdot x\right)}\right)}\\
\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 -2.774724760257283e+128)
(/
(* t (sqrt 2.0))
(-
(/ t (* (sqrt 2.0) (* x x)))
(+ (* t (sqrt 2.0)) (* (/ 2.0 (sqrt 2.0)) (+ (/ t (* x x)) (/ t x))))))
(if (<= t -1.02625065655815e-165)
(/
(* t (sqrt 2.0))
(sqrt (+ (* 4.0 (/ (* t t) x)) (* 2.0 (+ (* t t) (/ l (/ x l)))))))
(if (<= t -6.499970412284675e-208)
(/
(* t (sqrt 2.0))
(-
(/ (/ t x) (* (sqrt 2.0) x))
(+ (* t (sqrt 2.0)) (* 2.0 (/ t (* (sqrt 2.0) x))))))
(if (<= t 3.6293279203079994e+100)
(/
(* t (sqrt 2.0))
(sqrt (+ (* 4.0 (/ (* t t) x)) (* 2.0 (+ (* t t) (/ l (/ x l)))))))
(/
(* t (sqrt 2.0))
(+
(* (/ 2.0 (sqrt 2.0)) (+ (/ t (* x x)) (/ t x)))
(- (* t (sqrt 2.0)) (/ t (* (sqrt 2.0) (* x 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 <= -2.774724760257283e+128) {
tmp = (t * sqrt(2.0)) / ((t / (sqrt(2.0) * (x * x))) - ((t * sqrt(2.0)) + ((2.0 / sqrt(2.0)) * ((t / (x * x)) + (t / x)))));
} else if (t <= -1.02625065655815e-165) {
tmp = (t * sqrt(2.0)) / sqrt((4.0 * ((t * t) / x)) + (2.0 * ((t * t) + (l / (x / l)))));
} else if (t <= -6.499970412284675e-208) {
tmp = (t * sqrt(2.0)) / (((t / x) / (sqrt(2.0) * x)) - ((t * sqrt(2.0)) + (2.0 * (t / (sqrt(2.0) * x)))));
} else if (t <= 3.6293279203079994e+100) {
tmp = (t * sqrt(2.0)) / sqrt((4.0 * ((t * t) / x)) + (2.0 * ((t * t) + (l / (x / l)))));
} else {
tmp = (t * sqrt(2.0)) / (((2.0 / sqrt(2.0)) * ((t / (x * x)) + (t / x))) + ((t * sqrt(2.0)) - (t / (sqrt(2.0) * (x * x)))));
}
return tmp;
}



Bits error versus x



Bits error versus l



Bits error versus t
Results
if t < -2.77472476025728286e128Initial program 55.9
Taylor expanded around -inf 2.7
Simplified2.7
if -2.77472476025728286e128 < t < -1.02625065655815004e-165 or -6.4999704122846748e-208 < t < 3.62932792030799941e100Initial program 36.2
Taylor expanded around inf 16.7
Simplified16.7
rmApplied associate-/l*_binary64_2312.4
if -1.02625065655815004e-165 < t < -6.4999704122846748e-208Initial program 62.9
Taylor expanded around inf 41.4
Simplified41.4
Taylor expanded around -inf 26.8
Simplified26.8
if 3.62932792030799941e100 < t Initial program 50.0
Taylor expanded around inf 2.8
Simplified2.8
Final simplification9.2
herbie shell --seed 2020346
(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)))))