c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\begin{array}{l}
\mathbf{if}\;V \cdot \ell \le -7.60320495836003008 \cdot 10^{-291}:\\
\;\;\;\;c0 \cdot \sqrt{A \cdot \frac{\frac{1}{V}}{\ell}}\\
\mathbf{elif}\;V \cdot \ell \le 2.47033 \cdot 10^{-323}:\\
\;\;\;\;\left(c0 \cdot \sqrt{\frac{1}{V}}\right) \cdot \sqrt{\frac{A}{\ell}}\\
\mathbf{elif}\;V \cdot \ell \le 4.25252124024244761 \cdot 10^{295}:\\
\;\;\;\;\frac{c0 \cdot \sqrt{A}}{\sqrt{V \cdot \ell}}\\
\mathbf{else}:\\
\;\;\;\;c0 \cdot \sqrt{\frac{1}{V} \cdot \frac{A}{\ell}}\\
\end{array}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 VAR;
if (((V * l) <= -7.60320495836003e-291)) {
VAR = (c0 * sqrt((A * ((1.0 / V) / l))));
} else {
double VAR_1;
if (((V * l) <= 2.4703282292062e-323)) {
VAR_1 = ((c0 * sqrt((1.0 / V))) * sqrt((A / l)));
} else {
double VAR_2;
if (((V * l) <= 4.252521240242448e+295)) {
VAR_2 = ((c0 * sqrt(A)) / sqrt((V * l)));
} else {
VAR_2 = (c0 * sqrt(((1.0 / V) * (A / l))));
}
VAR_1 = VAR_2;
}
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) < -7.60320495836003e-291Initial program 14.2
rmApplied *-un-lft-identity14.2
Applied times-frac16.9
rmApplied div-inv16.9
Applied associate-*r*17.1
Simplified17.1
rmApplied div-inv17.1
Applied associate-*l*14.0
Simplified13.9
if -7.60320495836003e-291 < (* V l) < 2.4703282292062e-323Initial program 59.6
rmApplied *-un-lft-identity59.6
Applied times-frac36.0
Applied sqrt-prod39.5
Applied associate-*r*39.7
if 2.4703282292062e-323 < (* V l) < 4.252521240242448e+295Initial program 10.3
rmApplied sqrt-div0.6
Applied associate-*r/3.1
if 4.252521240242448e+295 < (* V l) Initial program 41.5
rmApplied *-un-lft-identity41.5
Applied times-frac25.2
Final simplification12.9
herbie shell --seed 2020100 +o rules:numerics
(FPCore (c0 A V l)
:name "Henrywood and Agarwal, Equation (3)"
:precision binary64
(* c0 (sqrt (/ A (* V l)))))