c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\begin{array}{l}
\mathbf{if}\;V \cdot \ell \le -6.04930864463111567 \cdot 10^{-251}:\\
\;\;\;\;c0 \cdot \left(\sqrt{\sqrt{\frac{\sqrt[3]{1} \cdot \sqrt[3]{1}}{\sqrt[3]{V} \cdot \sqrt[3]{V}} \cdot \frac{\frac{A}{\ell}}{\sqrt[3]{V}}}} \cdot \sqrt{\sqrt{\frac{1}{V} \cdot \frac{A}{\ell}}}\right)\\
\mathbf{elif}\;V \cdot \ell \le 1.2426573619189175 \cdot 10^{-285}:\\
\;\;\;\;\left(c0 \cdot \sqrt{\frac{1}{V}}\right) \cdot \sqrt{\frac{A}{\ell}}\\
\mathbf{elif}\;V \cdot \ell \le 5.5957256550553615 \cdot 10^{297}:\\
\;\;\;\;c0 \cdot \left(\sqrt{A} \cdot \sqrt{\frac{1}{V \cdot \ell}}\right)\\
\mathbf{else}:\\
\;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\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 temp;
if (((V * l) <= -6.049308644631116e-251)) {
temp = (c0 * (sqrt(sqrt((((cbrt(1.0) * cbrt(1.0)) / (cbrt(V) * cbrt(V))) * ((A / l) / cbrt(V))))) * sqrt(sqrt(((1.0 / V) * (A / l))))));
} else {
double temp_1;
if (((V * l) <= 1.2426573619189175e-285)) {
temp_1 = ((c0 * sqrt((1.0 / V))) * sqrt((A / l)));
} else {
double temp_2;
if (((V * l) <= 5.595725655055362e+297)) {
temp_2 = (c0 * (sqrt(A) * sqrt((1.0 / (V * l)))));
} else {
temp_2 = (c0 * sqrt(((A / V) / 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 l) < -6.049308644631116e-251Initial program 14.4
rmApplied *-un-lft-identity14.4
Applied times-frac17.2
rmApplied add-sqr-sqrt17.4
rmApplied add-cube-cbrt17.4
Applied add-cube-cbrt17.4
Applied times-frac17.4
Applied associate-*l*17.4
Simplified17.4
if -6.049308644631116e-251 < (* V l) < 1.2426573619189175e-285Initial program 51.7
rmApplied *-un-lft-identity51.7
Applied times-frac33.3
Applied sqrt-prod38.0
Applied associate-*r*38.6
if 1.2426573619189175e-285 < (* V l) < 5.595725655055362e+297Initial program 9.4
rmApplied div-inv9.4
Applied sqrt-prod0.4
if 5.595725655055362e+297 < (* V l) Initial program 38.6
rmApplied associate-/r*22.2
Final simplification14.1
herbie shell --seed 2020053 +o rules:numerics
(FPCore (c0 A V l)
:name "Henrywood and Agarwal, Equation (3)"
:precision binary64
(* c0 (sqrt (/ A (* V l)))))