\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 \le 4.84783032232548084 \cdot 10^{-283}:\\
\;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right) - \left(\left(n \cdot {\left(\sqrt[3]{\frac{\ell}{Om}} \cdot \sqrt[3]{\frac{\ell}{Om}}\right)}^{2}\right) \cdot {\left(\sqrt[3]{\frac{\ell}{Om}}\right)}^{2}\right) \cdot \left(U - U*\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot \left(\left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)}\\
\end{array}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 temp;
if ((n <= 4.847830322325481e-283)) {
temp = sqrt((((2.0 * n) * U) * ((t - (2.0 * (l * (l / Om)))) - (((n * pow((cbrt((l / Om)) * cbrt((l / Om))), 2.0)) * pow(cbrt((l / Om)), 2.0)) * (U - U_42_)))));
} else {
temp = (sqrt((2.0 * n)) * sqrt((U * ((t - (2.0 * (l * (l / Om)))) - ((n * pow((l / Om), 2.0)) * (U - U_42_))))));
}
return temp;
}



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 < 4.847830322325481e-283Initial program 34.5
rmApplied *-un-lft-identity34.5
Applied times-frac32.0
Simplified32.0
rmApplied add-cube-cbrt32.1
Applied unpow-prod-down32.1
Applied associate-*r*31.3
if 4.847830322325481e-283 < n Initial program 33.7
rmApplied *-un-lft-identity33.7
Applied times-frac30.8
Simplified30.8
rmApplied associate-*l*31.2
rmApplied sqrt-prod24.3
Final simplification28.0
herbie shell --seed 2020065 +o rules:numerics
(FPCore (n U t l Om U*)
:name "Toniolo and Linder, Equation (13)"
:precision binary64
(sqrt (* (* (* 2 n) U) (- (- t (* 2 (/ (* l l) Om))) (* (* n (pow (/ l Om) 2)) (- U U*))))))