\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 1.096720098972556 \cdot 10^{-309}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(\left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right) - n \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U - U*\right)\right)\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 <= 1.096720098972556e-309)) {
temp = sqrt(((2.0 * n) * (U * ((t - (2.0 * (l * (l / Om)))) - (n * (pow((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 < 1.096720098972556e-309Initial program 34.8
rmApplied *-un-lft-identity34.8
Applied times-frac32.0
Simplified32.0
rmApplied associate-*l*32.4
rmApplied associate-*l*32.7
if 1.096720098972556e-309 < n Initial program 35.0
rmApplied *-un-lft-identity35.0
Applied times-frac32.4
Simplified32.4
rmApplied associate-*l*32.8
rmApplied sqrt-prod25.8
Final simplification29.3
herbie shell --seed 2020060
(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*))))))