\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 -7.17877484811257513 \cdot 10^{-180}:\\
\;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell}{\frac{Om}{\ell}}\right) - \left(\left(n \cdot {\left(\frac{\ell}{Om}\right)}^{\left(\frac{2}{2}\right)}\right) \cdot {\left(\frac{\ell}{Om}\right)}^{\left(\frac{2}{2}\right)}\right) \cdot \left(U - U*\right)\right)}\\
\mathbf{elif}\;n \le 2.59414888185859238 \cdot 10^{-295}:\\
\;\;\;\;\sqrt{{\left(\left(\left(2 \cdot n\right) \cdot \left(t - \left(2 \cdot \frac{\ell}{\frac{Om}{\ell}} - \left(-n \cdot {\left(\frac{\ell}{Om}\right)}^{\left(2 \cdot \frac{2}{2}\right)}\right) \cdot \left(U - U*\right)\right)\right)\right) \cdot U\right)}^{1}}\\
\mathbf{elif}\;n \le 9.89439360611058735 \cdot 10^{-185}:\\
\;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot \left(\left(t - 2 \cdot \frac{\ell}{\frac{Om}{\ell}}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)}\\
\mathbf{elif}\;n \le 7.6023995975246642 \cdot 10^{-47}:\\
\;\;\;\;\sqrt{{\left(\left(\left(2 \cdot n\right) \cdot \left(t - \left(2 \cdot \frac{\ell}{\frac{Om}{\ell}} - \left(-n \cdot {\left(\frac{\ell}{Om}\right)}^{\left(2 \cdot \frac{2}{2}\right)}\right) \cdot \left(U - U*\right)\right)\right)\right) \cdot U\right)}^{1}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot \left(\left(t - 2 \cdot \frac{\ell}{\frac{Om}{\ell}}\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 VAR;
if ((n <= -7.178774848112575e-180)) {
VAR = sqrt((((2.0 * 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 {
double VAR_1;
if ((n <= 2.5941488818585924e-295)) {
VAR_1 = sqrt(pow((((2.0 * n) * (t - ((2.0 * (l / (Om / l))) - (-(n * pow((l / Om), (2.0 * (2.0 / 2.0)))) * (U - U_42_))))) * U), 1.0));
} else {
double VAR_2;
if ((n <= 9.894393606110587e-185)) {
VAR_2 = (sqrt((2.0 * n)) * sqrt((U * ((t - (2.0 * (l / (Om / l)))) - ((n * pow((l / Om), 2.0)) * (U - U_42_))))));
} else {
double VAR_3;
if ((n <= 7.602399597524664e-47)) {
VAR_3 = sqrt(pow((((2.0 * n) * (t - ((2.0 * (l / (Om / l))) - (-(n * pow((l / Om), (2.0 * (2.0 / 2.0)))) * (U - U_42_))))) * U), 1.0));
} else {
VAR_3 = (sqrt((2.0 * n)) * sqrt((U * ((t - (2.0 * (l / (Om / l)))) - ((n * pow((l / Om), 2.0)) * (U - U_42_))))));
}
VAR_2 = VAR_3;
}
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 < -7.178774848112575e-180Initial program 32.4
rmApplied associate-/l*29.6
rmApplied sqr-pow29.6
Applied associate-*r*29.0
if -7.178774848112575e-180 < n < 2.5941488818585924e-295 or 9.894393606110587e-185 < n < 7.602399597524664e-47Initial program 36.5
rmApplied associate-/l*33.4
rmApplied sqr-pow33.4
Applied associate-*r*32.6
rmApplied pow132.6
Applied pow132.6
Applied pow132.6
Applied pow132.6
Applied pow-prod-down32.6
Applied pow-prod-down32.6
Applied pow-prod-down32.6
Simplified29.5
if 2.5941488818585924e-295 < n < 9.894393606110587e-185 or 7.602399597524664e-47 < n Initial program 34.2
rmApplied associate-/l*31.3
rmApplied associate-*l*31.7
rmApplied sqrt-prod23.7
Final simplification27.3
herbie shell --seed 2020105
(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*))))))