c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\begin{array}{l}
\mathbf{if}\;V \cdot \ell \leq -\infty:\\
\;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\
\mathbf{elif}\;V \cdot \ell \leq -2.7289556725804634 \cdot 10^{-280} \lor \neg \left(V \cdot \ell \leq 5.727760610342335 \cdot 10^{-290}\right):\\
\;\;\;\;c0 \cdot \left(\left|\frac{\sqrt[3]{A}}{\sqrt[3]{V \cdot \ell}}\right| \cdot \sqrt{\sqrt[3]{A} \cdot \sqrt[3]{\frac{1}{V \cdot \ell}}}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(c0 \cdot \sqrt{\frac{1}{V}}\right) \cdot \sqrt{\frac{A}{\ell}}\\
\end{array}(FPCore (c0 A V l) :precision binary64 (* c0 (sqrt (/ A (* V l)))))
(FPCore (c0 A V l)
:precision binary64
(if (<= (* V l) (- INFINITY))
(* c0 (sqrt (/ (/ A V) l)))
(if (or (<= (* V l) -2.7289556725804634e-280)
(not (<= (* V l) 5.727760610342335e-290)))
(*
c0
(*
(fabs (/ (cbrt A) (cbrt (* V l))))
(sqrt (* (cbrt A) (cbrt (/ 1.0 (* V l)))))))
(* (* c0 (sqrt (/ 1.0 V))) (sqrt (/ A l))))))double code(double c0, double A, double V, double l) {
return c0 * sqrt(A / (V * l));
}
double code(double c0, double A, double V, double l) {
double tmp;
if ((V * l) <= -((double) INFINITY)) {
tmp = c0 * sqrt((A / V) / l);
} else if (((V * l) <= -2.7289556725804634e-280) || !((V * l) <= 5.727760610342335e-290)) {
tmp = c0 * (fabs(cbrt(A) / cbrt(V * l)) * sqrt(cbrt(A) * cbrt(1.0 / (V * l))));
} else {
tmp = (c0 * sqrt(1.0 / V)) * sqrt(A / l);
}
return tmp;
}



Bits error versus c0



Bits error versus A



Bits error versus V



Bits error versus l
Results
if (*.f64 V l) < -inf.0Initial program 40.5
rmApplied associate-/r*_binary64_70723.9
if -inf.0 < (*.f64 V l) < -2.7289556725804634e-280 or 5.727760610342335e-290 < (*.f64 V l) Initial program 12.4
rmApplied add-cube-cbrt_binary64_79812.8
Applied sqrt-prod_binary64_77912.8
Simplified12.8
rmApplied cbrt-div_binary64_79512.8
rmApplied div-inv_binary64_76012.8
Applied cbrt-prod_binary64_7944.2
if -2.7289556725804634e-280 < (*.f64 V l) < 5.727760610342335e-290Initial program 56.3
rmApplied *-un-lft-identity_binary64_76356.3
Applied times-frac_binary64_76935.3
Applied sqrt-prod_binary64_77939.3
Applied associate-*r*_binary64_70339.7
Simplified39.7
Final simplification9.3
herbie shell --seed 2020280
(FPCore (c0 A V l)
:name "Henrywood and Agarwal, Equation (3)"
:precision binary64
(* c0 (sqrt (/ A (* V l)))))