\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}\;U \le 2.0470025665376117 \cdot 10^{-307}:\\
\;\;\;\;\sqrt{2} \cdot \sqrt{n \cdot \left(U \cdot \left(\left(t - 2 \cdot \frac{\ell}{\frac{Om}{\ell}}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{\left(\frac{2}{2}\right)}\right) \cdot \left({\left(\frac{\ell}{Om}\right)}^{\left(\frac{2}{2}\right)} \cdot \left(U - U*\right)\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{U} \cdot \sqrt{\left(2 \cdot n\right) \cdot \left(\left(t - 2 \cdot \frac{\ell}{\frac{Om}{\ell}}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{\left(\frac{2}{2}\right)}\right) \cdot \left({\left(\frac{\ell}{Om}\right)}^{\left(\frac{2}{2}\right)} \cdot \left(U - U*\right)\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 VAR;
if ((U <= 2.0470025665376117e-307)) {
VAR = (sqrt(2.0) * sqrt((n * (U * ((t - (2.0 * (l / (Om / l)))) - ((n * pow((l / Om), (2.0 / 2.0))) * (pow((l / Om), (2.0 / 2.0)) * (U - U_42_))))))));
} else {
VAR = (sqrt(U) * sqrt(((2.0 * n) * ((t - (2.0 * (l / (Om / l)))) - ((n * pow((l / Om), (2.0 / 2.0))) * (pow((l / Om), (2.0 / 2.0)) * (U - U_42_)))))));
}
return VAR;
}



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 U < 2.0470025665376117e-307Initial program 34.7
rmApplied associate-/l*32.0
rmApplied sqr-pow32.0
Applied associate-*r*30.9
Applied associate-*l*31.0
rmApplied associate-*l*31.1
rmApplied associate-*l*31.1
Applied sqrt-prod31.2
if 2.0470025665376117e-307 < U Initial program 34.8
rmApplied associate-/l*32.2
rmApplied sqr-pow32.2
Applied associate-*r*31.5
Applied associate-*l*31.3
rmApplied *-commutative31.3
Applied associate-*l*31.2
Applied sqrt-prod23.8
Final simplification27.4
herbie shell --seed 2020078 +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*))))))