\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{n \cdot \left(U \cdot \left(\frac{n \cdot U*}{Om \cdot Om} - \left(\frac{2}{Om} + \frac{n \cdot U}{Om \cdot Om}\right)\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\right)\\
\mathbf{if}\;\ell \leq -9.090648582417688 \cdot 10^{+183}:\\
\;\;\;\;-t_1\\
\mathbf{elif}\;\ell \leq 5.755855238385077 \cdot 10^{+152}:\\
\;\;\;\;\begin{array}{l}
t_2 := \sqrt[3]{\left(n \cdot \frac{\ell}{Om}\right) \cdot \left(U* - U\right)}\\
\sqrt{\left(U \cdot \left(n \cdot 2\right)\right) \cdot \left(t + \frac{\ell}{Om} \cdot \left(\ell \cdot -2 + t_2 \cdot \left(t_2 \cdot t_2\right)\right)\right)}
\end{array}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\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
(*
n
(*
U
(- (/ (* n U*) (* Om Om)) (+ (/ 2.0 Om) (/ (* n U) (* Om Om)))))))
(* l (sqrt 2.0)))))
(if (<= l -9.090648582417688e+183)
(- t_1)
(if (<= l 5.755855238385077e+152)
(let* ((t_2 (cbrt (* (* n (/ l Om)) (- U* U)))))
(sqrt
(*
(* U (* n 2.0))
(+ t (* (/ l Om) (+ (* l -2.0) (* t_2 (* t_2 t_2))))))))
t_1))))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(n * (U * (((n * U_42_) / (Om * Om)) - ((2.0 / Om) + ((n * U) / (Om * Om)))))) * (l * sqrt(2.0));
double tmp;
if (l <= -9.090648582417688e+183) {
tmp = -t_1;
} else if (l <= 5.755855238385077e+152) {
double t_2 = cbrt((n * (l / Om)) * (U_42_ - U));
tmp = sqrt((U * (n * 2.0)) * (t + ((l / Om) * ((l * -2.0) + (t_2 * (t_2 * t_2))))));
} else {
tmp = t_1;
}
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 < -9.09064858241768765e183Initial program 64.0
Simplified53.1
Taylor expanded around -inf 33.4
Simplified33.4
if -9.09064858241768765e183 < l < 5.75585523838507736e152Initial program 28.7
Simplified29.2
rmApplied associate-*r*_binary6426.7
Simplified26.7
rmApplied add-cube-cbrt_binary6426.8
if 5.75585523838507736e152 < l Initial program 63.7
Simplified47.2
Taylor expanded around inf 33.3
Simplified33.3
Final simplification27.9
herbie shell --seed 2021204
(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*))))))