\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.022737789257463 \cdot 10^{+109}:\\
\;\;\;\;\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 8.323497236838193 \cdot 10^{-203} \lor \neg \left(t \leq 7.461103816305763 \cdot 10^{-157}\right) \land t \leq 8.156962978641518 \cdot 10^{+139}:\\
\;\;\;\;\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 -7.022737789257463e+109)
(/
(* 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 (or (<= t 8.323497236838193e-203)
(and (not (<= t 7.461103816305763e-157))
(<= t 8.156962978641518e+139)))
(/
(* 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 <= -7.022737789257463e+109) {
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 <= 8.323497236838193e-203) || (!(t <= 7.461103816305763e-157) && (t <= 8.156962978641518e+139))) {
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 < -7.02273778925746305e109Initial program 52.8
Taylor expanded around -inf 2.2
Simplified2.2
if -7.02273778925746305e109 < t < 8.32349723683819328e-203 or 7.46110381630576257e-157 < t < 8.15696297864151815e139Initial program 35.1
Taylor expanded around inf 16.6
Simplified16.6
rmApplied associate-/l*_binary64_2412.3
if 8.32349723683819328e-203 < t < 7.46110381630576257e-157 or 8.15696297864151815e139 < t Initial program 58.5
Taylor expanded around inf 6.6
Simplified6.6
Final simplification9.3
herbie shell --seed 2020288
(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)))))