\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 := \left(2 \cdot n\right) \cdot U\\
t_3 := t_2 \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_3 \leq 7.5785213595 \cdot 10^{-314}:\\
\;\;\;\;\begin{array}{l}
t_4 := \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \mathsf{fma}\left(\frac{\ell}{Om}, t_1, t\right)\right)}\\
\sqrt{t_4 \cdot t_4}
\end{array}\\
\mathbf{elif}\;t_3 \leq 3.85959885474332 \cdot 10^{+306}:\\
\;\;\;\;\sqrt{t_3}\\
\mathbf{elif}\;t_3 \leq \infty:\\
\;\;\;\;\sqrt{t_2} \cdot \sqrt{t + \frac{\ell}{Om} \cdot t_1}\\
\mathbf{else}:\\
\;\;\;\;\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)\\
\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 (* (* 2.0 n) U))
(t_3
(*
t_2
(-
(- t (* 2.0 (/ (* l l) Om)))
(* (* n (pow (/ l Om) 2.0)) (- U U*))))))
(if (<= t_3 7.5785213595e-314)
(let* ((t_4 (sqrt (* (* 2.0 n) (* U (fma (/ l Om) t_1 t))))))
(sqrt (* t_4 t_4)))
(if (<= t_3 3.85959885474332e+306)
(sqrt t_3)
(if (<= t_3 INFINITY)
(* (sqrt t_2) (sqrt (+ t (* (/ l Om) t_1))))
(*
(sqrt
(*
n
(*
U
(- (/ (* n U*) (* Om Om)) (+ (/ 2.0 Om) (/ (* n U) (* Om Om)))))))
(* 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 = fma(l, -2.0, ((U_42_ - U) * (n * (l / Om))));
double t_2 = (2.0 * n) * U;
double t_3 = t_2 * ((t - (2.0 * ((l * l) / Om))) - ((n * pow((l / Om), 2.0)) * (U - U_42_)));
double tmp;
if (t_3 <= 7.5785213595e-314) {
double t_4_1 = sqrt((2.0 * n) * (U * fma((l / Om), t_1, t)));
tmp = sqrt(t_4_1 * t_4_1);
} else if (t_3 <= 3.85959885474332e+306) {
tmp = sqrt(t_3);
} else if (t_3 <= ((double) INFINITY)) {
tmp = sqrt(t_2) * sqrt(t + ((l / Om) * t_1));
} else {
tmp = sqrt(n * (U * (((n * U_42_) / (Om * Om)) - ((2.0 / Om) + ((n * U) / (Om * Om)))))) * (l * sqrt(2.0));
}
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*)))) < 7.5785213595e-314Initial program 55.9
Simplified50.1
Applied associate-*l*_binary6435.4
Applied add-sqr-sqrt_binary6435.4
Simplified35.4
Simplified35.4
if 7.5785213595e-314 < (*.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*)))) < 3.85959885474331978e306Initial program 1.4
if 3.85959885474331978e306 < (*.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.8
Simplified52.4
Applied sqrt-prod_binary6449.1
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.6
Taylor expanded in l around inf 51.5
Simplified51.5
Final simplification25.6
herbie shell --seed 2021339
(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*))))))