\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.7366362175219267 \cdot 10^{-251}:\\
\;\;\;\;\sqrt{2} \cdot \frac{1}{-\sqrt{\frac{2}{x - 1} + 2 \cdot \frac{x}{x - 1}}}\\
\mathbf{elif}\;t \leq 1.6842041377497372 \cdot 10^{-254}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{-\sqrt{2 \cdot \frac{1}{{x}^{2}} + \left(2 \cdot \frac{1}{x} + 2 \cdot \frac{1}{{x}^{3}}\right)} \cdot \ell}\\
\mathbf{elif}\;t \leq 4.033396766201791 \cdot 10^{-159}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{t \cdot \sqrt{2} + \left(2 \cdot \frac{t}{\sqrt{2} \cdot x} + \frac{{\ell}^{2}}{t \cdot \left(\sqrt{2} \cdot x\right)}\right)}\\
\mathbf{elif}\;t \leq 1.1186517182972036 \cdot 10^{+73}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{\sqrt{2 \cdot \frac{{\ell}^{2}}{x} + \left(4 \cdot \frac{{t}^{2}}{x} + 2 \cdot {t}^{2}\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{t \cdot \sqrt{2 \cdot \frac{x}{x - 1} + 2 \cdot \frac{1}{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 -2.7366362175219267e-251)
(*
(sqrt 2.0)
(/ 1.0 (- (sqrt (+ (/ 2.0 (- x 1.0)) (* 2.0 (/ x (- x 1.0))))))))
(if (<= t 1.6842041377497372e-254)
(/
(* t (sqrt 2.0))
(-
(*
(sqrt
(+
(* 2.0 (/ 1.0 (pow x 2.0)))
(+ (* 2.0 (/ 1.0 x)) (* 2.0 (/ 1.0 (pow x 3.0))))))
l)))
(if (<= t 4.033396766201791e-159)
(/
(* t (sqrt 2.0))
(+
(* t (sqrt 2.0))
(+
(* 2.0 (/ t (* (sqrt 2.0) x)))
(/ (pow l 2.0) (* t (* (sqrt 2.0) x))))))
(if (<= t 1.1186517182972036e+73)
(/
(* t (sqrt 2.0))
(sqrt
(+
(* 2.0 (/ (pow l 2.0) x))
(+ (* 4.0 (/ (pow t 2.0) x)) (* 2.0 (pow t 2.0))))))
(/
(* t (sqrt 2.0))
(*
t
(sqrt (+ (* 2.0 (/ x (- x 1.0))) (* 2.0 (/ 1.0 (- 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 <= -2.7366362175219267e-251) {
tmp = sqrt(2.0) * (1.0 / -sqrt((2.0 / (x - 1.0)) + (2.0 * (x / (x - 1.0)))));
} else if (t <= 1.6842041377497372e-254) {
tmp = (t * sqrt(2.0)) / -(sqrt((2.0 * (1.0 / pow(x, 2.0))) + ((2.0 * (1.0 / x)) + (2.0 * (1.0 / pow(x, 3.0))))) * l);
} else if (t <= 4.033396766201791e-159) {
tmp = (t * sqrt(2.0)) / ((t * sqrt(2.0)) + ((2.0 * (t / (sqrt(2.0) * x))) + (pow(l, 2.0) / (t * (sqrt(2.0) * x)))));
} else if (t <= 1.1186517182972036e+73) {
tmp = (t * sqrt(2.0)) / sqrt((2.0 * (pow(l, 2.0) / x)) + ((4.0 * (pow(t, 2.0) / x)) + (2.0 * pow(t, 2.0))));
} else {
tmp = (t * sqrt(2.0)) / (t * sqrt((2.0 * (x / (x - 1.0))) + (2.0 * (1.0 / (x - 1.0)))));
}
return tmp;
}



Bits error versus x



Bits error versus l



Bits error versus t
Results
if t < -2.7366362175219267e-251Initial program 41.9
Taylor expanded around -inf 12.6
Simplified12.6
rmApplied *-un-lft-identity_binary6412.6
Applied times-frac_binary6412.7
Simplified12.7
Simplified12.5
if -2.7366362175219267e-251 < t < 1.684204137749737e-254Initial program 63.2
Taylor expanded around inf 39.5
Simplified39.5
Taylor expanded around -inf 32.1
if 1.684204137749737e-254 < t < 4.0333967662017909e-159Initial program 62.4
Taylor expanded around inf 24.4
if 4.0333967662017909e-159 < t < 1.11865171829720362e73Initial program 26.5
Taylor expanded around inf 10.3
if 1.11865171829720362e73 < t Initial program 46.9
Taylor expanded around inf 3.2
Final simplification12.0
herbie shell --seed 2021174
(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)))))