\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 := \ell \cdot \sqrt{2}\\
t_2 := \frac{n \cdot U*}{{Om}^{2}} - \left(\frac{n \cdot U}{{Om}^{2}} + 2 \cdot \frac{1}{Om}\right)\\
\mathbf{if}\;\ell \leq -8.771456429987835 \cdot 10^{+227}:\\
\;\;\;\;\left(\frac{\sqrt{2} \cdot t}{\ell} \cdot \sqrt{\frac{n \cdot U}{t_2}}\right) \cdot -0.5 - \sqrt{n \cdot \left(U \cdot t_2\right)} \cdot t_1\\
\mathbf{elif}\;\ell \leq -8.032622395303857 \cdot 10^{-172}:\\
\;\;\;\;\sqrt{\left(n \cdot 2\right) \cdot \left(U \cdot \left(t + \frac{\ell}{Om} \cdot \left(n \cdot \left(\ell \cdot \frac{U* - U}{Om}\right) + \ell \cdot -2\right)\right)\right)}\\
\mathbf{elif}\;\ell \leq 2.135898270312147 \cdot 10^{-97}:\\
\;\;\;\;\sqrt{\left(n \cdot 2\right) \cdot \left(U \cdot \left(t + \frac{\ell}{Om} \cdot \left(\ell \cdot -2 + \frac{n \cdot \left(\ell \cdot U*\right)}{Om}\right)\right)\right)}\\
\mathbf{elif}\;\ell \leq 4.0389359801185104 \cdot 10^{+172}:\\
\;\;\;\;\sqrt{\left(n \cdot 2\right) \cdot \left(U \cdot \left(t + \frac{\ell}{Om} \cdot \left(\ell \cdot -2 + n \cdot \left(\frac{\ell}{\sqrt[3]{Om} \cdot \sqrt[3]{Om}} \cdot \frac{U* - U}{\sqrt[3]{Om}}\right)\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot \sqrt{\left(n \cdot U\right) \cdot t_2}\\
\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 (* l (sqrt 2.0)))
(t_2
(-
(/ (* n U*) (pow Om 2.0))
(+ (/ (* n U) (pow Om 2.0)) (* 2.0 (/ 1.0 Om))))))
(if (<= l -8.771456429987835e+227)
(-
(* (* (/ (* (sqrt 2.0) t) l) (sqrt (/ (* n U) t_2))) -0.5)
(* (sqrt (* n (* U t_2))) t_1))
(if (<= l -8.032622395303857e-172)
(sqrt
(*
(* n 2.0)
(* U (+ t (* (/ l Om) (+ (* n (* l (/ (- U* U) Om))) (* l -2.0)))))))
(if (<= l 2.135898270312147e-97)
(sqrt
(*
(* n 2.0)
(* U (+ t (* (/ l Om) (+ (* l -2.0) (/ (* n (* l U*)) Om)))))))
(if (<= l 4.0389359801185104e+172)
(sqrt
(*
(* n 2.0)
(*
U
(+
t
(*
(/ l Om)
(+
(* l -2.0)
(*
n
(*
(/ l (* (cbrt Om) (cbrt Om)))
(/ (- U* U) (cbrt Om))))))))))
(* t_1 (sqrt (* (* n U) t_2)))))))))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 = l * sqrt(2.0);
double t_2 = ((n * U_42_) / pow(Om, 2.0)) - (((n * U) / pow(Om, 2.0)) + (2.0 * (1.0 / Om)));
double tmp;
if (l <= -8.771456429987835e+227) {
tmp = ((((sqrt(2.0) * t) / l) * sqrt((n * U) / t_2)) * -0.5) - (sqrt(n * (U * t_2)) * t_1);
} else if (l <= -8.032622395303857e-172) {
tmp = sqrt((n * 2.0) * (U * (t + ((l / Om) * ((n * (l * ((U_42_ - U) / Om))) + (l * -2.0))))));
} else if (l <= 2.135898270312147e-97) {
tmp = sqrt((n * 2.0) * (U * (t + ((l / Om) * ((l * -2.0) + ((n * (l * U_42_)) / Om))))));
} else if (l <= 4.0389359801185104e+172) {
tmp = sqrt((n * 2.0) * (U * (t + ((l / Om) * ((l * -2.0) + (n * ((l / (cbrt(Om) * cbrt(Om))) * ((U_42_ - U) / cbrt(Om)))))))));
} else {
tmp = t_1 * sqrt((n * U) * t_2);
}
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 l < -8.77145642998783535e227Initial program 64.0
Simplified54.9
rmApplied associate-*l*_binary6456.1
Simplified58.5
Taylor expanded around -inf 37.2
if -8.77145642998783535e227 < l < -8.03262239530385652e-172Initial program 34.5
Simplified30.7
rmApplied associate-*l*_binary6430.3
Simplified30.8
rmApplied *-un-lft-identity_binary6430.8
Applied times-frac_binary6429.5
if -8.03262239530385652e-172 < l < 2.13589827031214706e-97Initial program 24.6
Simplified26.9
rmApplied associate-*l*_binary6428.7
Simplified25.0
Taylor expanded around inf 25.2
if 2.13589827031214706e-97 < l < 4.03893598011851e172Initial program 32.5
Simplified30.7
rmApplied associate-*l*_binary6429.1
Simplified30.1
rmApplied add-cube-cbrt_binary6430.1
Applied times-frac_binary6428.0
if 4.03893598011851e172 < l Initial program 64.0
Simplified51.6
Taylor expanded around inf 32.2
Final simplification28.2
herbie shell --seed 2021196
(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*))))))