\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 -8.677514333815515 \cdot 10^{-13}:\\
\;\;\;\;\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 5.411969238321326 \cdot 10^{+51}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{\sqrt{4 \cdot \frac{t \cdot t}{x} + 2 \cdot \left(t \cdot t + \ell \cdot \frac{\ell}{x}\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 -8.677514333815515e-13)
(/
(* 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 5.411969238321326e+51)
(/
(* t (sqrt 2.0))
(sqrt (+ (* 4.0 (/ (* t t) x)) (* 2.0 (+ (* t t) (* l (/ l x)))))))
(/
(* 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 <= -8.677514333815515e-13) {
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 <= 5.411969238321326e+51) {
tmp = (t * sqrt(2.0)) / sqrt((4.0 * ((t * t) / x)) + (2.0 * ((t * t) + (l * (l / x)))));
} 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 < -8.67751433381551473e-13Initial program 40.4
Taylor expanded around -inf 4.9
Simplified4.9
if -8.67751433381551473e-13 < t < 5.4119692383213262e51Initial program 43.3
Taylor expanded around inf 19.1
Simplified19.1
rmApplied *-un-lft-identity_binary6419.1
Applied times-frac_binary6415.3
Simplified15.3
if 5.4119692383213262e51 < t Initial program 44.9
Taylor expanded around inf 3.8
Simplified3.8
Final simplification9.5
herbie shell --seed 2020232
(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)))))