\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}
t_1 := \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{if}\;t_1 \leq 4.0472807858519556 \cdot 10^{-142}:\\
\;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot \left(t + \frac{\ell}{Om} \cdot \left(\frac{\ell}{Om} \cdot \left(n \cdot \left(U* - U\right)\right) + \ell \cdot -2\right)\right)}\\
\mathbf{elif}\;t_1 \leq 1.7229508048023988 \cdot 10^{+152}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(\left(\sqrt[3]{U} \cdot \sqrt[3]{U}\right) \cdot \left(\sqrt[3]{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)\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
(let* ((t_1
(sqrt
(*
(* (* 2.0 n) U)
(-
(- t (* 2.0 (/ (* l l) Om)))
(* (* n (pow (/ l Om) 2.0)) (- U U*)))))))
(if (<= t_1 4.0472807858519556e-142)
(*
(sqrt (* 2.0 n))
(sqrt
(* U (+ t (* (/ l Om) (+ (* (/ l Om) (* n (- U* U))) (* l -2.0)))))))
(if (<= t_1 1.7229508048023988e+152)
t_1
(sqrt
(*
(* 2.0 n)
(*
(* (cbrt U) (cbrt U))
(*
(cbrt 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 t_1 = sqrt(((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * pow((l / Om), 2.0)) * (U - U_42_))));
double tmp;
if (t_1 <= 4.0472807858519556e-142) {
tmp = sqrt(2.0 * n) * sqrt(U * (t + ((l / Om) * (((l / Om) * (n * (U_42_ - U))) + (l * -2.0)))));
} else if (t_1 <= 1.7229508048023988e+152) {
tmp = t_1;
} else {
tmp = sqrt((2.0 * n) * ((cbrt(U) * cbrt(U)) * (cbrt(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 (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*))))) < 4.0472807858519556e-142Initial program 51.7
Simplified51.5
rmApplied associate-*l*_binary6434.0
Simplified34.0
rmApplied sqrt-prod_binary6436.4
if 4.0472807858519556e-142 < (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*))))) < 1.7229508048023988e152Initial program 1.3
if 1.7229508048023988e152 < (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 63.7
Simplified54.8
rmApplied associate-*l*_binary6454.9
Simplified54.9
rmApplied add-cube-cbrt_binary6455.0
Applied associate-*l*_binary6455.0
Simplified53.0
Final simplification27.8
herbie shell --seed 2021198
(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*))))))