\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(\ell, -2, \left(U* - U\right) \cdot \left(n \cdot \frac{\ell}{Om}\right)\right)\\
t_4 := \mathsf{fma}\left(\frac{\ell}{Om}, t_3, t\right)\\
\mathbf{if}\;t_2 \leq 8.836062299 \cdot 10^{-314}:\\
\;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot t_4}\\
\mathbf{else}:\\
\;\;\;\;\begin{array}{l}
t_5 := t_1 \cdot t\\
\mathbf{if}\;t_2 \leq 5.7633557427454346 \cdot 10^{+299}:\\
\;\;\;\;\sqrt{t_5 + t_1 \cdot \left(\frac{\ell}{Om} \cdot t_3\right)}\\
\mathbf{elif}\;t_2 \leq \infty:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot U\right)} \cdot \sqrt{t_4}\\
\mathbf{else}:\\
\;\;\;\;\begin{array}{l}
t_6 := n \cdot \left(U \cdot \ell\right)\\
\sqrt{t_5 + -2 \cdot \frac{t_6 \cdot \mathsf{fma}\left(2, \ell, \frac{t_6}{Om}\right)}{Om}}
\end{array}\\
\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*)))))
(t_3 (fma l -2.0 (* (- U* U) (* n (/ l Om)))))
(t_4 (fma (/ l Om) t_3 t)))
(if (<= t_2 8.836062299e-314)
(* (sqrt (* 2.0 n)) (sqrt (* U t_4)))
(let* ((t_5 (* t_1 t)))
(if (<= t_2 5.7633557427454346e+299)
(sqrt (+ t_5 (* t_1 (* (/ l Om) t_3))))
(if (<= t_2 INFINITY)
(* (sqrt (* 2.0 (* n U))) (sqrt t_4))
(let* ((t_6 (* n (* U l))))
(sqrt
(+ t_5 (* -2.0 (/ (* t_6 (fma 2.0 l (/ t_6 Om))) Om)))))))))))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, -2.0, ((U_42_ - U) * (n * (l / Om))));
double t_4 = fma((l / Om), t_3, t);
double tmp;
if (t_2 <= 8.836062299e-314) {
tmp = sqrt(2.0 * n) * sqrt(U * t_4);
} else {
double t_5 = t_1 * t;
double tmp_1;
if (t_2 <= 5.7633557427454346e+299) {
tmp_1 = sqrt(t_5 + (t_1 * ((l / Om) * t_3)));
} else if (t_2 <= ((double) INFINITY)) {
tmp_1 = sqrt(2.0 * (n * U)) * sqrt(t_4);
} else {
double t_6 = n * (U * l);
tmp_1 = sqrt(t_5 + (-2.0 * ((t_6 * fma(2.0, l, (t_6 / Om))) / Om)));
}
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*)))) < 8.83606229909e-314Initial program 55.9
Simplified50.1
Applied associate-*l*_binary6436.8
Applied sqrt-prod_binary6439.4
Simplified39.4
Simplified39.4
if 8.83606229909e-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*)))) < 5.7633557427454346e299Initial program 1.5
Simplified0.9
Applied distribute-rgt-in_binary640.9
if 5.7633557427454346e299 < (*.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.2
Simplified52.3
Applied distribute-rgt-in_binary6452.3
Applied distribute-rgt-out_binary6452.3
Applied sqrt-prod_binary6449.7
Simplified49.7
Simplified49.7
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.5
Applied distribute-rgt-in_binary6463.5
Taylor expanded in U* around 0 41.0
Simplified41.0
Final simplification25.0
herbie shell --seed 2022055
(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*))))))