\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 2.7845435699981 \cdot 10^{-315}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{\ell}{Om} \cdot \left(\ell \cdot -2 + n \cdot \left(\frac{\ell}{Om} \cdot \left(U* - U\right)\right)\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(t + \frac{\ell}{Om} \cdot \left(\ell \cdot -2 + n \cdot \left(\frac{\ell}{Om} \cdot \left(U* - U\right)\right)\right)\right)}} \cdot \sqrt{\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(t + \frac{\ell}{Om} \cdot \left(\ell \cdot -2 + n \cdot \left(\frac{\ell}{Om} \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*))))
2.7845435699981e-315)
(sqrt
(*
(* 2.0 n)
(* U (+ t (* (/ l Om) (+ (* l -2.0) (* n (* (/ l Om) (- U* U)))))))))
(*
(sqrt
(sqrt
(*
(* (* 2.0 n) U)
(+ t (* (/ l Om) (+ (* l -2.0) (* n (* (/ l Om) (- U* U)))))))))
(sqrt
(sqrt
(*
(* (* 2.0 n) U)
(+ t (* (/ l Om) (+ (* l -2.0) (* n (* (/ l Om) (- 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_)))) <= 2.7845435699981e-315) {
tmp = sqrt((2.0 * n) * (U * (t + ((l / Om) * ((l * -2.0) + (n * ((l / Om) * (U_42_ - U))))))));
} else {
tmp = sqrt(sqrt(((2.0 * n) * U) * (t + ((l / Om) * ((l * -2.0) + (n * ((l / Om) * (U_42_ - U)))))))) * sqrt(sqrt(((2.0 * n) * U) * (t + ((l / Om) * ((l * -2.0) + (n * ((l / Om) * (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*)))) < 2.78454357e-315Initial program 57.1
Simplified51.1
rmApplied associate-*l*_binary64_35736.9
if 2.78454357e-315 < (*.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 29.5
Simplified26.1
rmApplied add-sqr-sqrt_binary64_43526.4
Final simplification28.2
herbie shell --seed 2020292
(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*))))))