c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\begin{array}{l}
\mathbf{if}\;V \cdot \ell \leq -\infty:\\
\;\;\;\;\left(\sqrt{\frac{\sqrt[3]{A} \cdot \sqrt[3]{A}}{V}} \cdot c0\right) \cdot \sqrt{\frac{\sqrt[3]{A}}{\ell}}\\
\mathbf{elif}\;V \cdot \ell \leq -3.6360644608746207 \cdot 10^{-277}:\\
\;\;\;\;c0 \cdot \sqrt{A \cdot \frac{\frac{1}{V}}{\ell}}\\
\mathbf{elif}\;V \cdot \ell \leq 0:\\
\;\;\;\;c0 \cdot \left(\sqrt{\frac{1}{V}} \cdot \sqrt{\frac{A}{\ell}}\right)\\
\mathbf{else}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{A}}{\sqrt{V \cdot \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))
(* (* (sqrt (/ (* (cbrt A) (cbrt A)) V)) c0) (sqrt (/ (cbrt A) l)))
(if (<= (* V l) -3.6360644608746207e-277)
(* c0 (sqrt (* A (/ (/ 1.0 V) l))))
(if (<= (* V l) 0.0)
(* c0 (* (sqrt (/ 1.0 V)) (sqrt (/ A l))))
(* c0 (/ (sqrt A) (sqrt (* V 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 = (sqrt((cbrt(A) * cbrt(A)) / V) * c0) * sqrt(cbrt(A) / l);
} else if ((V * l) <= -3.6360644608746207e-277) {
tmp = c0 * sqrt(A * ((1.0 / V) / l));
} else if ((V * l) <= 0.0) {
tmp = c0 * (sqrt(1.0 / V) * sqrt(A / l));
} else {
tmp = c0 * (sqrt(A) / sqrt(V * 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.6
rmApplied add-cube-cbrt_binary64_79540.6
Applied times-frac_binary64_76622.7
Applied sqrt-prod_binary64_77632.1
Applied associate-*r*_binary64_70032.3
Simplified32.3
if -inf.0 < (*.f64 V l) < -3.63606446087462065e-277Initial program 9.6
rmApplied div-inv_binary64_7579.7
rmApplied associate-/r*_binary64_7049.6
if -3.63606446087462065e-277 < (*.f64 V l) < -0.0Initial program 58.2
rmApplied *-un-lft-identity_binary64_76058.2
Applied times-frac_binary64_76636.5
Applied sqrt-prod_binary64_77639.6
if -0.0 < (*.f64 V l) Initial program 15.1
rmApplied sqrt-div_binary64_7776.9
Final simplification12.9
herbie shell --seed 2020342
(FPCore (c0 A V l)
:name "Henrywood and Agarwal, Equation (3)"
:precision binary64
(* c0 (sqrt (/ A (* V l)))))