\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}\;t \leq 8.057802521813321 \cdot 10^{-302}:\\
\;\;\;\;\sqrt{\sqrt[3]{t + \frac{\ell}{Om} \cdot \left(\ell \cdot -2 + n \cdot \left(\frac{\ell}{Om} \cdot \left(U* - U\right)\right)\right)} \cdot \left(\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\sqrt[3]{t + \frac{\ell}{Om} \cdot \left(\ell \cdot -2 + n \cdot \left(\frac{\ell}{Om} \cdot \left(U* - U\right)\right)\right)} \cdot \sqrt[3]{t + \frac{\ell}{Om} \cdot \left(\ell \cdot -2 + n \cdot \left(\frac{\ell}{Om} \cdot \left(U* - U\right)\right)\right)}\right)\right)}\\
\mathbf{elif}\;t \leq 2.4664257672184813 \cdot 10^{-245} \lor \neg \left(t \leq 9.132669359376227 \cdot 10^{-188}\right):\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot U} \cdot \sqrt{t + \frac{\ell}{Om} \cdot \left(\ell \cdot -2 + n \cdot \left(\frac{\ell}{Om} \cdot \left(U* - U\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{\ell}{Om} \cdot \left(\ell \cdot -2 + n \cdot \left(\frac{\ell}{Om} \cdot \left(U* - U\right)\right)\right)\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 (<= t 8.057802521813321e-302)
(sqrt
(*
(cbrt (+ t (* (/ l Om) (+ (* l -2.0) (* n (* (/ l Om) (- U* U)))))))
(*
(* (* 2.0 n) U)
(*
(cbrt (+ t (* (/ l Om) (+ (* l -2.0) (* n (* (/ l Om) (- U* U)))))))
(cbrt (+ t (* (/ l Om) (+ (* l -2.0) (* n (* (/ l Om) (- U* U)))))))))))
(if (or (<= t 2.4664257672184813e-245) (not (<= t 9.132669359376227e-188)))
(*
(sqrt (* (* 2.0 n) U))
(sqrt (+ t (* (/ l Om) (+ (* l -2.0) (* n (* (/ l Om) (- U* U))))))))
(sqrt
(*
(* 2.0 n)
(* U (+ t (* (/ l Om) (+ (* l -2.0) (* n (* (/ l Om) (- U* U))))))))))))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 (t <= 8.057802521813321e-302) {
tmp = sqrt(cbrt(t + ((l / Om) * ((l * -2.0) + (n * ((l / Om) * (U_42_ - U)))))) * (((2.0 * n) * U) * (cbrt(t + ((l / Om) * ((l * -2.0) + (n * ((l / Om) * (U_42_ - U)))))) * cbrt(t + ((l / Om) * ((l * -2.0) + (n * ((l / Om) * (U_42_ - U)))))))));
} else if ((t <= 2.4664257672184813e-245) || !(t <= 9.132669359376227e-188)) {
tmp = sqrt((2.0 * n) * U) * sqrt(t + ((l / Om) * ((l * -2.0) + (n * ((l / Om) * (U_42_ - U))))));
} else {
tmp = sqrt((2.0 * n) * (U * (t + ((l / Om) * ((l * -2.0) + (n * ((l / Om) * (U_42_ - U))))))));
}
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 t < 8.05780252181332071e-302Initial program 34.1
Simplified30.7
rmApplied add-cube-cbrt_binary64_44631.0
Applied associate-*r*_binary64_35631.0
if 8.05780252181332071e-302 < t < 2.46642576721848128e-245 or 9.13266935937622693e-188 < t Initial program 34.4
Simplified30.6
rmApplied sqrt-prod_binary64_42928.5
if 2.46642576721848128e-245 < t < 9.13266935937622693e-188Initial program 35.2
Simplified29.7
rmApplied associate-*l*_binary64_35730.9
Final simplification29.8
herbie shell --seed 2020299
(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*))))))