\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)}\begin{array}{l}
\mathbf{if}\;n \leq -2.477163411318746 \cdot 10^{+50}:\\
\;\;\;\;\sqrt{\left(\left(n \cdot 2\right) \cdot U\right) \cdot \left(t + \frac{\ell}{Om} \cdot \left(\ell \cdot -2 + \frac{n \cdot \ell}{Om} \cdot \left(U* - U\right)\right)\right)}\\
\mathbf{elif}\;n \leq 1.540202642029673 \cdot 10^{-309}:\\
\;\;\;\;\sqrt{\left(n \cdot 2\right) \cdot \left(U \cdot \left(t + \frac{\ell}{Om} \cdot \left(\ell \cdot -2 + \frac{\ell}{Om} \cdot \left(n \cdot \left(U* - U\right)\right)\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{n \cdot 2} \cdot \sqrt{U \cdot \left(t + \frac{\ell}{Om} \cdot \left(\ell \cdot -2 + n \cdot \frac{\ell \cdot \left(U* - U\right)}{Om}\right)\right)}\\
\end{array}(FPCore (n U t l Om U*) :precision binary64 (sqrt (* (* (* 2.0 n) U) (- (- t (* 2.0 (/ (* l l) Om))) (* (* n (pow (/ l Om) 2.0)) (- U U*))))))
(FPCore (n U t l Om U*)
:precision binary64
(if (<= n -2.477163411318746e+50)
(sqrt
(*
(* (* n 2.0) U)
(+ t (* (/ l Om) (+ (* l -2.0) (* (/ (* n l) Om) (- U* U)))))))
(if (<= n 1.540202642029673e-309)
(sqrt
(*
(* n 2.0)
(* U (+ t (* (/ l Om) (+ (* l -2.0) (* (/ l Om) (* n (- U* U)))))))))
(*
(sqrt (* n 2.0))
(sqrt
(* U (+ t (* (/ l Om) (+ (* l -2.0) (* n (/ (* l (- U* U)) Om)))))))))))double code(double n, double U, double t, double l, double Om, double U_42_) {
return sqrt(((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * pow((l / Om), 2.0)) * (U - U_42_))));
}
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (n <= -2.477163411318746e+50) {
tmp = sqrt(((n * 2.0) * U) * (t + ((l / Om) * ((l * -2.0) + (((n * l) / Om) * (U_42_ - U))))));
} else if (n <= 1.540202642029673e-309) {
tmp = sqrt((n * 2.0) * (U * (t + ((l / Om) * ((l * -2.0) + ((l / Om) * (n * (U_42_ - U))))))));
} else {
tmp = sqrt(n * 2.0) * sqrt(U * (t + ((l / Om) * ((l * -2.0) + (n * ((l * (U_42_ - U)) / Om))))));
}
return tmp;
}



Bits error versus n



Bits error versus U



Bits error versus t



Bits error versus l



Bits error versus Om



Bits error versus U*
Results
if n < -2.477163411318746e50Initial program 36.1
Simplified38.9
rmApplied associate-*r*_binary6432.3
Simplified32.3
Taylor expanded around 0 34.4
Simplified34.4
if -2.477163411318746e50 < n < 1.5402026420296733e-309Initial program 35.6
Simplified31.4
rmApplied associate-*l*_binary6430.9
if 1.5402026420296733e-309 < n Initial program 34.9
Simplified33.5
rmApplied associate-*l*_binary6434.0
Simplified33.2
rmApplied sqrt-prod_binary6425.5
Final simplification28.7
herbie shell --seed 2021118
(FPCore (n U t l Om U*)
:name "Toniolo and Linder, Equation (13)"
:precision binary64
(sqrt (* (* (* 2.0 n) U) (- (- t (* 2.0 (/ (* l l) Om))) (* (* n (pow (/ l Om) 2.0)) (- U U*))))))