\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 := \mathsf{fma}\left(\ell, -2, \left(U* - U\right) \cdot \left(n \cdot \frac{\ell}{Om}\right)\right)\\
t_2 := t + \frac{\ell}{Om} \cdot t_1\\
\mathbf{if}\;n \leq -9.254387380680668 \cdot 10^{-304}:\\
\;\;\;\;\sqrt{\left(n \cdot 2\right) \cdot \left(U \cdot t_2\right)}\\
\mathbf{elif}\;n \leq 1.4305959469237383 \cdot 10^{-147} \lor \neg \left(n \leq 1.2885585308675987 \cdot 10^{-44}\right):\\
\;\;\;\;\sqrt{n \cdot 2} \cdot \sqrt{U \cdot \mathsf{fma}\left(\frac{\ell}{Om}, t_1, t\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{t_2 \cdot \left(\left(n \cdot 2\right) \cdot U\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 (fma l -2.0 (* (- U* U) (* n (/ l Om)))))
(t_2 (+ t (* (/ l Om) t_1))))
(if (<= n -9.254387380680668e-304)
(sqrt (* (* n 2.0) (* U t_2)))
(if (or (<= n 1.4305959469237383e-147)
(not (<= n 1.2885585308675987e-44)))
(* (sqrt (* n 2.0)) (sqrt (* U (fma (/ l Om) t_1 t))))
(sqrt (* t_2 (* (* n 2.0) 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 = fma(l, -2.0, ((U_42_ - U) * (n * (l / Om))));
double t_2 = t + ((l / Om) * t_1);
double tmp;
if (n <= -9.254387380680668e-304) {
tmp = sqrt((n * 2.0) * (U * t_2));
} else if ((n <= 1.4305959469237383e-147) || !(n <= 1.2885585308675987e-44)) {
tmp = sqrt(n * 2.0) * sqrt(U * fma((l / Om), t_1, t));
} else {
tmp = sqrt(t_2 * ((n * 2.0) * 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*
if n < -9.25438738068066798e-304Initial program 33.9
Simplified29.9
Applied associate-*l*_binary6430.0
Applied *-un-lft-identity_binary6430.0
if -9.25438738068066798e-304 < n < 1.4305959469237383e-147 or 1.2885585308675987e-44 < n Initial program 35.2
Simplified31.4
Applied associate-*l*_binary6431.0
Applied sqrt-prod_binary6423.4
Simplified23.4
Simplified23.4
if 1.4305959469237383e-147 < n < 1.2885585308675987e-44Initial program 33.1
Simplified28.1
Applied *-commutative_binary6428.1
Final simplification27.1
herbie shell --seed 2021275
(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*))))))