\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}\;\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)} \leq 0:\\
\;\;\;\;\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)}\\
\mathbf{elif}\;\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)} \leq 2.3824026548713994 \cdot 10^{+149}:\\
\;\;\;\;\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)}\\
\mathbf{elif}\;\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)} \leq \infty:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot U} \cdot \sqrt{\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)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(\left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right) - \left(U - U*\right) \cdot \left(\frac{\ell}{Om} \cdot \left(\left(n \cdot \ell\right) \cdot \frac{1}{Om}\right)\right)\right)\right)}\\
\end{array}(FPCore (n U t l Om U*) :precision binary64 (sqrt (* (* (* 2.0 n) U) (- (- t (* 2.0 (/ (* l l) Om))) (* (* n (pow (/ l Om) 2.0)) (- U U*))))))
(FPCore (n U t l Om U*)
:precision binary64
(if (<=
(sqrt
(*
(* (* 2.0 n) U)
(-
(- t (* 2.0 (/ (* l l) Om)))
(* (* n (pow (/ l Om) 2.0)) (- U U*)))))
0.0)
(*
(sqrt (* 2.0 n))
(sqrt
(*
U
(- (- t (* 2.0 (* l (/ l Om)))) (* (* n (pow (/ l Om) 2.0)) (- U U*))))))
(if (<=
(sqrt
(*
(* (* 2.0 n) U)
(-
(- t (* 2.0 (/ (* l l) Om)))
(* (* n (pow (/ l Om) 2.0)) (- U U*)))))
2.3824026548713994e+149)
(sqrt
(*
(* (* 2.0 n) U)
(- (- t (* 2.0 (/ (* l l) Om))) (* (* n (pow (/ l Om) 2.0)) (- U U*)))))
(if (<=
(sqrt
(*
(* (* 2.0 n) U)
(-
(- t (* 2.0 (/ (* l l) Om)))
(* (* n (pow (/ l Om) 2.0)) (- U U*)))))
INFINITY)
(*
(sqrt (* (* 2.0 n) U))
(sqrt
(-
(- t (* 2.0 (* l (/ l Om))))
(* (* n (pow (/ l Om) 2.0)) (- U U*)))))
(sqrt
(*
(* 2.0 n)
(*
U
(-
(- t (* 2.0 (* l (/ l Om))))
(* (- U U*) (* (/ l Om) (* (* n l) (/ 1.0 Om))))))))))))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 tmp;
if (sqrt(((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * pow((l / Om), 2.0)) * (U - U_42_)))) <= 0.0) {
tmp = sqrt(2.0 * n) * sqrt(U * ((t - (2.0 * (l * (l / Om)))) - ((n * pow((l / Om), 2.0)) * (U - U_42_))));
} else if (sqrt(((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * pow((l / Om), 2.0)) * (U - U_42_)))) <= 2.3824026548713994e+149) {
tmp = sqrt(((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * pow((l / Om), 2.0)) * (U - U_42_))));
} else if (sqrt(((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * pow((l / Om), 2.0)) * (U - U_42_)))) <= ((double) INFINITY)) {
tmp = sqrt((2.0 * n) * U) * sqrt((t - (2.0 * (l * (l / Om)))) - ((n * pow((l / Om), 2.0)) * (U - U_42_)));
} else {
tmp = sqrt((2.0 * n) * (U * ((t - (2.0 * (l * (l / Om)))) - ((U - U_42_) * ((l / Om) * ((n * l) * (1.0 / Om)))))));
}
return tmp;
}



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 (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < 0.0Initial program 56.4
rmApplied *-un-lft-identity_binary64_41956.4
Applied times-frac_binary64_42556.4
Simplified56.4
rmApplied associate-*l*_binary64_36039.6
rmApplied sqrt-prod_binary64_43537.9
if 0.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < 2.38240265487139941e149Initial program 1.6
if 2.38240265487139941e149 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < +inf.0Initial program 62.8
rmApplied *-un-lft-identity_binary64_41962.8
Applied times-frac_binary64_42553.8
Simplified53.8
rmApplied sqrt-prod_binary64_43549.1
if +inf.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) Initial program 64.0
rmApplied *-un-lft-identity_binary64_41964.0
Applied times-frac_binary64_42561.5
Simplified61.5
rmApplied associate-*l*_binary64_36057.0
rmApplied unpow2_binary64_48457.0
Applied associate-*r*_binary64_35952.0
rmApplied div-inv_binary64_41652.0
Applied associate-*r*_binary64_35952.2
Final simplification26.2
herbie shell --seed 2020354
(FPCore (n U t l Om U*)
:name "Toniolo and Linder, Equation (13)"
:precision binary64
(sqrt (* (* (* 2.0 n) U) (- (- t (* 2.0 (/ (* l l) Om))) (* (* n (pow (/ l Om) 2.0)) (- U U*))))))