c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\begin{array}{l}
\mathbf{if}\;V \le -7.24944730302796452 \cdot 10^{-9}:\\
\;\;\;\;\left(\sqrt[3]{c0 \cdot \left(\left|\sqrt[3]{A}\right| \cdot \sqrt{\frac{\sqrt[3]{A}}{V \cdot \ell}}\right)} \cdot \sqrt[3]{c0 \cdot \left(\left|\sqrt[3]{A}\right| \cdot \sqrt{\frac{\sqrt[3]{A}}{V \cdot \ell}}\right)}\right) \cdot \sqrt[3]{c0 \cdot \left(\left|\sqrt[3]{A}\right| \cdot \sqrt{\frac{\sqrt[3]{A}}{V \cdot \ell}}\right)}\\
\mathbf{elif}\;V \le -3.2698369089058447 \cdot 10^{-220}:\\
\;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\
\mathbf{elif}\;V \le 8.37998221063094693 \cdot 10^{-237}:\\
\;\;\;\;c0 \cdot \left(\left|\sqrt[3]{A}\right| \cdot \sqrt{\frac{1}{\frac{V \cdot \ell}{\sqrt[3]{A}}}}\right)\\
\mathbf{else}:\\
\;\;\;\;c0 \cdot \left(\left|\sqrt[3]{A}\right| \cdot \left(\sqrt{\frac{\sqrt[3]{\sqrt[3]{A} \cdot \sqrt[3]{A}}}{V}} \cdot \sqrt{\frac{\sqrt[3]{\sqrt[3]{A}}}{\ell}}\right)\right)\\
\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 temp;
if ((V <= -7.2494473030279645e-09)) {
temp = ((cbrt((c0 * (fabs(cbrt(A)) * sqrt((cbrt(A) / (V * l)))))) * cbrt((c0 * (fabs(cbrt(A)) * sqrt((cbrt(A) / (V * l))))))) * cbrt((c0 * (fabs(cbrt(A)) * sqrt((cbrt(A) / (V * l)))))));
} else {
double temp_1;
if ((V <= -3.2698369089058447e-220)) {
temp_1 = (c0 * sqrt(((A / V) / l)));
} else {
double temp_2;
if ((V <= 8.379982210630947e-237)) {
temp_2 = (c0 * (fabs(cbrt(A)) * sqrt((1.0 / ((V * l) / cbrt(A))))));
} else {
temp_2 = (c0 * (fabs(cbrt(A)) * (sqrt((cbrt((cbrt(A) * cbrt(A))) / V)) * sqrt((cbrt(cbrt(A)) / l)))));
}
temp_1 = temp_2;
}
temp = temp_1;
}
return temp;
}



Bits error versus c0



Bits error versus A



Bits error versus V



Bits error versus l
Results
if V < -7.2494473030279645e-09Initial program 18.1
rmApplied add-cube-cbrt18.4
Applied associate-/l*18.4
rmApplied div-inv18.4
Applied sqrt-prod13.4
Simplified13.4
Simplified13.1
rmApplied add-cube-cbrt13.5
if -7.2494473030279645e-09 < V < -3.2698369089058447e-220Initial program 17.5
rmApplied associate-/r*18.1
if -3.2698369089058447e-220 < V < 8.379982210630947e-237Initial program 30.0
rmApplied add-cube-cbrt30.3
Applied associate-/l*30.3
rmApplied div-inv30.4
Applied sqrt-prod25.8
Simplified25.8
Simplified25.8
rmApplied clear-num25.8
if 8.379982210630947e-237 < V Initial program 16.9
rmApplied add-cube-cbrt17.3
Applied associate-/l*17.3
rmApplied div-inv17.3
Applied sqrt-prod11.9
Simplified11.9
Simplified11.6
rmApplied add-cube-cbrt11.7
Applied cbrt-prod11.7
Applied times-frac10.3
Applied sqrt-prod3.0
Final simplification11.0
herbie shell --seed 2020060 +o rules:numerics
(FPCore (c0 A V l)
:name "Henrywood and Agarwal, Equation (3)"
:precision binary64
(* c0 (sqrt (/ A (* V l)))))