\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)\\
t_3 := \mathsf{fma}\left(\frac{\ell}{Om}, \mathsf{fma}\left(\ell, -2, \left(U* - U\right) \cdot \frac{n \cdot \ell}{Om}\right), t\right)\\
\mathbf{if}\;t_2 \leq 0:\\
\;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot t_3}\\
\mathbf{elif}\;t_2 \leq 9.168804510954963 \cdot 10^{+284}:\\
\;\;\;\;\sqrt{t_1 \cdot \left(t + \frac{\ell}{Om} \cdot \mathsf{fma}\left(\ell, -2, \left(U* - U\right) \cdot \left(n \cdot \frac{\ell}{Om}\right)\right)\right)}\\
\mathbf{elif}\;t_2 \leq \infty:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot U\right)} \cdot \sqrt{t_3}\\
\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 (* (* 2.0 n) U))
(t_2
(*
t_1
(-
(- t (* 2.0 (/ (* l l) Om)))
(* (* n (pow (/ l Om) 2.0)) (- U U*)))))
(t_3 (fma (/ l Om) (fma l -2.0 (* (- U* U) (/ (* n l) Om))) t)))
(if (<= t_2 0.0)
(* (sqrt (* 2.0 n)) (sqrt (* U t_3)))
(if (<= t_2 9.168804510954963e+284)
(sqrt
(* t_1 (+ t (* (/ l Om) (fma l -2.0 (* (- U* U) (* n (/ l Om))))))))
(if (<= t_2 INFINITY)
(* (sqrt (* 2.0 (* n U))) (sqrt t_3))
(*
(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 = (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 t_3 = fma((l / Om), fma(l, -2.0, ((U_42_ - U) * ((n * l) / Om))), t);
double tmp;
if (t_2 <= 0.0) {
tmp = sqrt(2.0 * n) * sqrt(U * t_3);
} else if (t_2 <= 9.168804510954963e+284) {
tmp = sqrt(t_1 * (t + ((l / Om) * fma(l, -2.0, ((U_42_ - U) * (n * (l / Om)))))));
} else if (t_2 <= ((double) INFINITY)) {
tmp = sqrt(2.0 * (n * U)) * sqrt(t_3);
} 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*)))) < -0.0Initial program 57.9
Simplified52.7
Applied associate-*l*_binary6437.9
Simplified38.5
Applied sqrt-prod_binary6439.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*)))) < 9.16880451095496303e284Initial program 1.9
Simplified1.4
if 9.16880451095496303e284 < (*.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 60.9
Simplified51.1
Applied sqrt-prod_binary6449.1
Simplified49.1
Simplified50.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.3
Taylor expanded in l around inf 50.5
Simplified50.5
Final simplification26.7
herbie shell --seed 2021280
(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*))))))