\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}\;\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{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{\ell}{Om} \cdot \left(\ell \cdot -2 + \sqrt[3]{{\left(n \cdot \frac{\ell}{Om}\right)}^{3}} \cdot \left(U* - U\right)\right)\right)\right)}\\
\mathbf{elif}\;\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 5.447651663049996 \cdot 10^{+296}:\\
\;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(t + \frac{\ell}{Om} \cdot \left(\ell \cdot -2 + \left(n \cdot \frac{\ell}{Om}\right) \cdot \left(U* - U\right)\right)\right)}\\
\mathbf{elif}\;\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{t + \frac{\ell}{Om} \cdot \left(\ell \cdot -2 + \left(n \cdot \frac{\ell}{Om}\right) \cdot \left(U* - U\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{\ell}{Om} \cdot \left(\ell \cdot -2 + \sqrt[3]{{\left(n \cdot \frac{\ell}{Om}\right)}^{3}} \cdot \left(U* - U\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 (<=
(*
(* (* 2.0 n) U)
(- (- t (* 2.0 (/ (* l l) Om))) (* (* n (pow (/ l Om) 2.0)) (- U U*))))
0.0)
(sqrt
(*
(* 2.0 n)
(*
U
(+
t
(*
(/ l Om)
(+ (* l -2.0) (* (cbrt (pow (* n (/ l Om)) 3.0)) (- U* U))))))))
(if (<=
(*
(* (* 2.0 n) U)
(-
(- t (* 2.0 (/ (* l l) Om)))
(* (* n (pow (/ l Om) 2.0)) (- U U*))))
5.447651663049996e+296)
(sqrt
(*
(* (* 2.0 n) U)
(+ t (* (/ l Om) (+ (* l -2.0) (* (* n (/ l Om)) (- U* U)))))))
(if (<=
(*
(* (* 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 (* (/ l Om) (+ (* l -2.0) (* (* n (/ l Om)) (- U* U)))))))
(sqrt
(*
(* 2.0 n)
(*
U
(+
t
(*
(/ l Om)
(+
(* l -2.0)
(* (cbrt (pow (* n (/ l Om)) 3.0)) (- U* U))))))))))))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 ((((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) * (U * (t + ((l / Om) * ((l * -2.0) + (cbrt(pow((n * (l / Om)), 3.0)) * (U_42_ - U)))))));
} else if ((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * pow((l / Om), 2.0)) * (U - U_42_)))) <= 5.447651663049996e+296) {
tmp = sqrt(((2.0 * n) * U) * (t + ((l / Om) * ((l * -2.0) + ((n * (l / Om)) * (U_42_ - U))))));
} else if ((((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 + ((l / Om) * ((l * -2.0) + ((n * (l / Om)) * (U_42_ - U)))));
} else {
tmp = sqrt((2.0 * n) * (U * (t + ((l / Om) * ((l * -2.0) + (cbrt(pow((n * (l / Om)), 3.0)) * (U_42_ - U)))))));
}
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 (*.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.0 or +inf.0 < (*.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 60.3
Simplified57.4
rmApplied associate-*r*_binary64_35956.8
Simplified56.8
rmApplied associate-*l*_binary64_36043.8
rmApplied add-cbrt-cube_binary64_45545.1
Simplified45.1
if 0.0 < (*.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*)))) < 5.447651663049996e296Initial program 1.7
Simplified5.9
rmApplied associate-*r*_binary64_3591.5
Simplified1.5
if 5.447651663049996e296 < (*.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.7
Simplified52.1
rmApplied associate-*r*_binary64_35952.3
Simplified52.3
rmApplied sqrt-prod_binary64_43549.2
Final simplification26.3
herbie shell --seed 2020356
(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*))))))