\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 := n \cdot \frac{\ell}{Om}\\
t_2 := \mathsf{fma}\left(\ell, -2, \left(U* - U\right) \cdot t_1\right)\\
t_3 := \left(n \cdot 2\right) \cdot U\\
\mathbf{if}\;n \leq -2.5977007171734475 \cdot 10^{-155}:\\
\;\;\;\;\sqrt{t_3 \cdot \left(t + \frac{\ell}{Om} \cdot t_2\right)}\\
\mathbf{elif}\;n \leq -4.516790978706167 \cdot 10^{-210}:\\
\;\;\;\;\sqrt{\left(n \cdot 2\right) \cdot \left(U \cdot \left(t + \frac{\ell}{Om} \cdot \mathsf{fma}\left(\ell, -2, \frac{\ell}{Om} \cdot \left(n \cdot \left(U* - U\right)\right)\right)\right)\right)}\\
\mathbf{elif}\;n \leq -3.6403704785603 \cdot 10^{-310}:\\
\;\;\;\;\sqrt{t_3 \cdot \left(t + \frac{\ell}{Om} \cdot \mathsf{fma}\left(\ell, -2, \left(U* - U\right) \cdot \mathsf{log1p}\left(\mathsf{expm1}\left(t_1\right)\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{n \cdot 2} \cdot \sqrt{U \cdot \mathsf{fma}\left(\frac{\ell}{Om}, t_2, t\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 (* n (/ l Om)))
(t_2 (fma l -2.0 (* (- U* U) t_1)))
(t_3 (* (* n 2.0) U)))
(if (<= n -2.5977007171734475e-155)
(sqrt (* t_3 (+ t (* (/ l Om) t_2))))
(if (<= n -4.516790978706167e-210)
(sqrt
(*
(* n 2.0)
(* U (+ t (* (/ l Om) (fma l -2.0 (* (/ l Om) (* n (- U* U)))))))))
(if (<= n -3.6403704785603e-310)
(sqrt
(*
t_3
(+ t (* (/ l Om) (fma l -2.0 (* (- U* U) (log1p (expm1 t_1))))))))
(* (sqrt (* n 2.0)) (sqrt (* U (fma (/ l Om) t_2 t)))))))))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 = n * (l / Om);
double t_2 = fma(l, -2.0, ((U_42_ - U) * t_1));
double t_3 = (n * 2.0) * U;
double tmp;
if (n <= -2.5977007171734475e-155) {
tmp = sqrt(t_3 * (t + ((l / Om) * t_2)));
} else if (n <= -4.516790978706167e-210) {
tmp = sqrt((n * 2.0) * (U * (t + ((l / Om) * fma(l, -2.0, ((l / Om) * (n * (U_42_ - U))))))));
} else if (n <= -3.6403704785603e-310) {
tmp = sqrt(t_3 * (t + ((l / Om) * fma(l, -2.0, ((U_42_ - U) * log1p(expm1(t_1)))))));
} else {
tmp = sqrt(n * 2.0) * sqrt(U * fma((l / Om), t_2, t));
}
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 n < -2.59770071717344751e-155Initial program 33.1
Simplified28.9
Applied *-commutative_binary6428.9
if -2.59770071717344751e-155 < n < -4.5167909787061671e-210Initial program 37.3
Simplified31.9
Applied associate-*l*_binary6429.2
Applied associate-*r*_binary6429.2
if -4.5167909787061671e-210 < n < -3.640370478560313e-310Initial program 40.2
Simplified36.1
Applied log1p-expm1-u_binary6436.1
if -3.640370478560313e-310 < n Initial program 34.1
Simplified30.4
Applied associate-*l*_binary6429.8
Applied sqrt-prod_binary6422.8
Simplified22.8
Simplified22.8
Final simplification26.6
herbie shell --seed 2022087
(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*))))))