\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 -1.3221287020936742 \cdot 10^{+43}:\\
\;\;\;\;\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.2539860067398703 \cdot 10^{-182}:\\
\;\;\;\;\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{elif}\;t \leq -4.459218330231056 \cdot 10^{-196}:\\
\;\;\;\;\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.994070347116178 \cdot 10^{-267}:\\
\;\;\;\;\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{elif}\;t \leq 1.1976647284219064 \cdot 10^{-299}:\\
\;\;\;\;\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.444142802464952 \cdot 10^{-246}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{\sqrt{4 \cdot \frac{t \cdot t}{x} + 2 \cdot \left(t \cdot t + \left(\ell \cdot \ell\right) \cdot \frac{1}{x}\right)}}\\
\mathbf{elif}\;t \leq 1.0390836696447033 \cdot 10^{-156} \lor \neg \left(t \leq 4.476892235675878 \cdot 10^{+40}\right):\\
\;\;\;\;\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)}\\
\mathbf{else}:\\
\;\;\;\;\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)}}\\
\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 -1.3221287020936742e+43)
(/
(* 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.2539860067398703e-182)
(/
(* t (sqrt 2.0))
(sqrt (+ (* 4.0 (/ (* t t) x)) (* 2.0 (+ (* t t) (* l (/ l x)))))))
(if (<= t -4.459218330231056e-196)
(/
(* 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.994070347116178e-267)
(/
(* t (sqrt 2.0))
(sqrt (+ (* 4.0 (/ (* t t) x)) (* 2.0 (+ (* t t) (* l (/ l x)))))))
(if (<= t 1.1976647284219064e-299)
(/
(* 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 8.444142802464952e-246)
(/
(* t (sqrt 2.0))
(sqrt
(+
(* 4.0 (/ (* t t) x))
(* 2.0 (+ (* t t) (* (* l l) (/ 1.0 x)))))))
(if (or (<= t 1.0390836696447033e-156)
(not (<= t 4.476892235675878e+40)))
(/
(* t (sqrt 2.0))
(+
(* (/ 2.0 (sqrt 2.0)) (+ (/ t (* x x)) (/ t x)))
(- (* t (sqrt 2.0)) (/ t (* (sqrt 2.0) (* x x))))))
(/
(* t (sqrt 2.0))
(sqrt
(+
(* 4.0 (/ (* t t) x))
(* 2.0 (+ (* t t) (* l (/ l 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 <= -1.3221287020936742e+43) {
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.2539860067398703e-182) {
tmp = (t * sqrt(2.0)) / sqrt((4.0 * ((t * t) / x)) + (2.0 * ((t * t) + (l * (l / x)))));
} else if (t <= -4.459218330231056e-196) {
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.994070347116178e-267) {
tmp = (t * sqrt(2.0)) / sqrt((4.0 * ((t * t) / x)) + (2.0 * ((t * t) + (l * (l / x)))));
} else if (t <= 1.1976647284219064e-299) {
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.444142802464952e-246) {
tmp = (t * sqrt(2.0)) / sqrt((4.0 * ((t * t) / x)) + (2.0 * ((t * t) + ((l * l) * (1.0 / x)))));
} else if ((t <= 1.0390836696447033e-156) || !(t <= 4.476892235675878e+40)) {
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)))));
} else {
tmp = (t * sqrt(2.0)) / sqrt((4.0 * ((t * t) / x)) + (2.0 * ((t * t) + (l * (l / x)))));
}
return tmp;
}



Bits error versus x



Bits error versus l



Bits error versus t
Results
if t < -1.3221287020936742e43 or -1.25398600673987026e-182 < t < -4.4592183302310563e-196 or -1.99407034711617797e-267 < t < 1.19766472842190642e-299Initial program 46.5
Taylor expanded around -inf 9.7
Simplified9.7
if -1.3221287020936742e43 < t < -1.25398600673987026e-182 or -4.4592183302310563e-196 < t < -1.99407034711617797e-267 or 1.0390836696447033e-156 < t < 4.47689223567587812e40Initial program 35.2
Taylor expanded around inf 14.4
Simplified14.4
rmApplied *-un-lft-identity_binary6414.4
Applied times-frac_binary649.5
Simplified9.5
if 1.19766472842190642e-299 < t < 8.4441428024649517e-246Initial program 63.2
Taylor expanded around inf 33.8
Simplified33.8
rmApplied div-inv_binary6433.8
if 8.4441428024649517e-246 < t < 1.0390836696447033e-156 or 4.47689223567587812e40 < t Initial program 46.8
Taylor expanded around inf 8.5
Simplified8.5
Final simplification10.0
herbie shell --seed 2020220
(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)))))