\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 := \left(2 \cdot n\right) \cdot U\\
t_2 := t_1 \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_2 \leq 0:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \mathsf{fma}\left(\frac{\ell}{Om}, \mathsf{fma}\left(\ell, -2, \left(U* - U\right) \cdot \left(\left(n \cdot \ell\right) \cdot \frac{1}{Om}\right)\right), t\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\begin{array}{l}
t_3 := t + \frac{\ell}{Om} \cdot \mathsf{fma}\left(\ell, -2, \left(U* - U\right) \cdot \left(n \cdot \frac{\ell}{Om}\right)\right)\\
\mathbf{if}\;t_2 \leq 1.402222179697007 \cdot 10^{+299}:\\
\;\;\;\;\sqrt{t_1 \cdot t_3}\\
\mathbf{elif}\;t_2 \leq \infty:\\
\;\;\;\;\sqrt{t_1} \cdot \sqrt{t_3}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{n \cdot \left(U \cdot \left(\frac{n \cdot U*}{{Om}^{2}} - \left(2 \cdot \frac{1}{Om} + \frac{n \cdot U}{{Om}^{2}}\right)\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\right)\\
\end{array}\\
\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 (* (* 2.0 n) U))
(t_2
(*
t_1
(-
(- t (* 2.0 (/ (* l l) Om)))
(* (* n (pow (/ l Om) 2.0)) (- U U*))))))
(if (<= t_2 0.0)
(sqrt
(*
(* 2.0 n)
(*
U
(fma (/ l Om) (fma l -2.0 (* (- U* U) (* (* n l) (/ 1.0 Om)))) t))))
(let* ((t_3 (+ t (* (/ l Om) (fma l -2.0 (* (- U* U) (* n (/ l Om))))))))
(if (<= t_2 1.402222179697007e+299)
(sqrt (* t_1 t_3))
(if (<= t_2 INFINITY)
(* (sqrt t_1) (sqrt t_3))
(*
(sqrt
(*
n
(*
U
(-
(/ (* n U*) (pow Om 2.0))
(+ (* 2.0 (/ 1.0 Om)) (/ (* n U) (pow Om 2.0)))))))
(* l (sqrt 2.0)))))))))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 = (2.0 * n) * U;
double t_2 = t_1 * ((t - (2.0 * ((l * l) / Om))) - ((n * pow((l / Om), 2.0)) * (U - U_42_)));
double tmp;
if (t_2 <= 0.0) {
tmp = sqrt((2.0 * n) * (U * fma((l / Om), fma(l, -2.0, ((U_42_ - U) * ((n * l) * (1.0 / Om)))), t)));
} else {
double t_3 = t + ((l / Om) * fma(l, -2.0, ((U_42_ - U) * (n * (l / Om)))));
double tmp_1;
if (t_2 <= 1.402222179697007e+299) {
tmp_1 = sqrt(t_1 * t_3);
} else if (t_2 <= ((double) INFINITY)) {
tmp_1 = sqrt(t_1) * sqrt(t_3);
} else {
tmp_1 = sqrt(n * (U * (((n * U_42_) / pow(Om, 2.0)) - ((2.0 * (1.0 / Om)) + ((n * U) / pow(Om, 2.0)))))) * (l * sqrt(2.0));
}
tmp = tmp_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*
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.0Initial program 57.7
Simplified51.9
Applied associate-*l*_binary6436.4
Simplified37.5
Applied div-inv_binary6437.5
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*)))) < 1.4022221796970069e299Initial program 1.7
Simplified1.2
Applied add-cube-cbrt_binary641.3
Applied *-un-lft-identity_binary641.3
Applied associate-*l*_binary641.3
Simplified1.2
if 1.4022221796970069e299 < (*.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 63.0
Simplified52.1
Applied sqrt-prod_binary6449.4
if +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 64.0
Simplified63.4
Taylor expanded in l around inf 51.4
Final simplification26.4
herbie shell --seed 2022077
(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*))))))