c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\begin{array}{l}
\mathbf{if}\;V \cdot \ell \le -3.9279438898199403 \cdot 10^{-218}:\\
\;\;\;\;c0 \cdot \sqrt{A \cdot \frac{1}{V \cdot \ell}}\\
\mathbf{elif}\;V \cdot \ell \le 0.0:\\
\;\;\;\;c0 \cdot \sqrt{\frac{1}{V} \cdot \frac{A}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;c0 \cdot \left(\sqrt{A} \cdot \sqrt{\frac{1}{V \cdot \ell}}\right)\\
\end{array}double code(double c0, double A, double V, double l) {
return ((double) (c0 * ((double) sqrt((A / ((double) (V * l)))))));
}
double code(double c0, double A, double V, double l) {
double VAR;
if ((((double) (V * l)) <= -3.9279438898199403e-218)) {
VAR = ((double) (c0 * ((double) sqrt(((double) (A * (1.0 / ((double) (V * l)))))))));
} else {
double VAR_1;
if ((((double) (V * l)) <= 0.0)) {
VAR_1 = ((double) (c0 * ((double) sqrt(((double) ((1.0 / V) * (A / l)))))));
} else {
VAR_1 = ((double) (c0 * ((double) (((double) sqrt(A)) * ((double) sqrt((1.0 / ((double) (V * l)))))))));
}
VAR = VAR_1;
}
return VAR;
}



Bits error versus c0



Bits error versus A



Bits error versus V



Bits error versus l
Results
if (* V l) < -3.9279438898199403e-218Initial program 14.4
rmApplied div-inv14.4
if -3.9279438898199403e-218 < (* V l) < 0.0Initial program 51.6
rmApplied *-un-lft-identity51.6
Applied times-frac33.5
if 0.0 < (* V l) Initial program 15.5
rmApplied div-inv15.6
Applied sqrt-prod7.3
Final simplification13.5
herbie shell --seed 2020182
(FPCore (c0 A V l)
:name "Henrywood and Agarwal, Equation (3)"
:precision binary64
(* c0 (sqrt (/ A (* V l)))))