\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 -3923563313.0125809:\\
\;\;\;\;\sqrt{n \cdot \left(\left(2 \cdot U\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({\ell}^{\left(\frac{2}{2}\right)} \cdot \left({\left(\frac{1}{Om}\right)}^{\left(\frac{2}{2}\right)} \cdot \left(U - U*\right)\right)\right)\right)\right)}\\
\mathbf{elif}\;n \le -9.5860089707144562 \cdot 10^{-249}:\\
\;\;\;\;\sqrt{U \cdot \left(\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)\right)}\\
\mathbf{elif}\;n \le 3.9597083294460349 \cdot 10^{-303}:\\
\;\;\;\;\sqrt{n \cdot \left(\left(2 \cdot U\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({\ell}^{\left(\frac{2}{2}\right)} \cdot \left({\left(\frac{1}{Om}\right)}^{\left(\frac{2}{2}\right)} \cdot \left(U - U*\right)\right)\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;{n}^{\frac{1}{2}} \cdot \sqrt{\left(2 \cdot U\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 ((n <= -3923563313.012581)) {
VAR = sqrt((n * ((2.0 * U) * ((t - (2.0 * (l / (Om / l)))) - ((n * pow((l / Om), (2.0 / 2.0))) * (pow(l, (2.0 / 2.0)) * (pow((1.0 / Om), (2.0 / 2.0)) * (U - U_42_))))))));
} else {
double VAR_1;
if ((n <= -9.586008970714456e-249)) {
VAR_1 = sqrt((U * ((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_)))))));
} else {
double VAR_2;
if ((n <= 3.959708329446035e-303)) {
VAR_2 = sqrt((n * ((2.0 * U) * ((t - (2.0 * (l / (Om / l)))) - ((n * pow((l / Om), (2.0 / 2.0))) * (pow(l, (2.0 / 2.0)) * (pow((1.0 / Om), (2.0 / 2.0)) * (U - U_42_))))))));
} else {
VAR_2 = (pow(n, 0.5) * sqrt(((2.0 * 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_)))))));
}
VAR_1 = VAR_2;
}
VAR = VAR_1;
}
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 n < -3923563313.012581 or -9.586008970714456e-249 < n < 3.959708329446035e-303Initial program 36.3
rmApplied associate-/l*33.8
rmApplied sqr-pow33.8
Applied associate-*r*32.8
Applied associate-*l*32.4
rmApplied *-commutative32.4
Applied associate-*l*32.3
Applied associate-*l*32.2
rmApplied div-inv32.2
Applied unpow-prod-down32.2
Applied associate-*l*33.7
if -3923563313.012581 < n < -9.586008970714456e-249Initial program 35.0
rmApplied associate-/l*31.8
rmApplied sqr-pow31.8
Applied associate-*r*31.1
Applied associate-*l*31.5
rmApplied *-commutative31.5
Applied associate-*l*27.6
if 3.959708329446035e-303 < n Initial program 33.8
rmApplied associate-/l*31.3
rmApplied sqr-pow31.3
Applied associate-*r*30.5
Applied associate-*l*30.4
rmApplied *-commutative30.4
Applied associate-*l*30.4
Applied associate-*l*31.0
Applied sqrt-prod23.5
Simplified23.5
Final simplification27.2
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*))))))