c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\begin{array}{l}
\mathbf{if}\;V \cdot \ell \leq -7.19110256370914 \cdot 10^{+197}:\\
\;\;\;\;c0 \cdot \sqrt{\frac{1}{V \cdot \frac{\ell}{A}}}\\
\mathbf{elif}\;V \cdot \ell \leq -2.0654560949368145 \cdot 10^{-165}:\\
\;\;\;\;c0 \cdot \sqrt{A \cdot \frac{1}{V \cdot \ell}}\\
\mathbf{elif}\;V \cdot \ell \leq -0:\\
\;\;\;\;c0 \cdot \sqrt{\frac{1}{V} \cdot \frac{A}{\ell}}\\
\mathbf{elif}\;V \cdot \ell \leq 1.0038216364336875 \cdot 10^{+283}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{A}}{\sqrt{V \cdot \ell}}\\
\mathbf{else}:\\
\;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\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) -7.19110256370914e+197)
(* c0 (sqrt (/ 1.0 (* V (/ l A)))))
(if (<= (* V l) -2.0654560949368145e-165)
(* c0 (sqrt (* A (/ 1.0 (* V l)))))
(if (<= (* V l) -0.0)
(* c0 (sqrt (* (/ 1.0 V) (/ A l))))
(if (<= (* V l) 1.0038216364336875e+283)
(* c0 (/ (sqrt A) (sqrt (* V l))))
(* c0 (sqrt (/ (/ A V) l))))))))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 tmp;
if ((((double) (V * l)) <= -7.19110256370914e+197)) {
tmp = ((double) (c0 * ((double) sqrt((1.0 / ((double) (V * (l / A))))))));
} else {
double tmp_1;
if ((((double) (V * l)) <= -2.0654560949368145e-165)) {
tmp_1 = ((double) (c0 * ((double) sqrt(((double) (A * (1.0 / ((double) (V * l)))))))));
} else {
double tmp_2;
if ((((double) (V * l)) <= -0.0)) {
tmp_2 = ((double) (c0 * ((double) sqrt(((double) ((1.0 / V) * (A / l)))))));
} else {
double tmp_3;
if ((((double) (V * l)) <= 1.0038216364336875e+283)) {
tmp_3 = ((double) (c0 * (((double) sqrt(A)) / ((double) sqrt(((double) (V * l)))))));
} else {
tmp_3 = ((double) (c0 * ((double) sqrt(((A / V) / l)))));
}
tmp_2 = tmp_3;
}
tmp_1 = tmp_2;
}
tmp = tmp_1;
}
return tmp;
}



Bits error versus c0



Bits error versus A



Bits error versus V



Bits error versus l
Results
if (* V l) < -7.19110256370913983e197Initial program Error: 29.0 bits
rmApplied clear-numError: 29.4 bits
SimplifiedError: 19.7 bits
if -7.19110256370913983e197 < (* V l) < -2.0654560949368145e-165Initial program Error: 6.0 bits
rmApplied div-invError: 6.0 bits
if -2.0654560949368145e-165 < (* V l) < -0.0Initial program Error: 44.3 bits
rmApplied *-un-lft-identityError: 44.3 bits
Applied times-fracError: 31.7 bits
if -0.0 < (* V l) < 1.0038216364336875e283Initial program Error: 10.2 bits
rmApplied sqrt-divError: 0.7 bits
if 1.0038216364336875e283 < (* V l) Initial program Error: 39.0 bits
rmApplied associate-/r*Error: 22.2 bits
Final simplificationError: 10.9 bits
herbie shell --seed 2020203
(FPCore (c0 A V l)
:name "Henrywood and Agarwal, Equation (3)"
:precision binary64
(* c0 (sqrt (/ A (* V l)))))