c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}
\begin{array}{l}
\mathbf{if}\;V \cdot \ell \leq -2.403333487912658 \cdot 10^{-111}:\\
\;\;\;\;c0 \cdot \sqrt{A \cdot \frac{1}{V \cdot \ell}}\\
\mathbf{elif}\;V \cdot \ell \leq 2.5967983781006628 \cdot 10^{-263}:\\
\;\;\;\;c0 \cdot \sqrt{\frac{1}{\frac{V}{\frac{A}{\ell}}}}\\
\mathbf{else}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{A}}{\sqrt{V \cdot \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) -2.403333487912658e-111)
(* c0 (sqrt (* A (/ 1.0 (* V l)))))
(if (<= (* V l) 2.5967983781006628e-263)
(* c0 (sqrt (/ 1.0 (/ V (/ A l)))))
(* c0 (/ (sqrt A) (sqrt (* V l)))))))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 tmp;
if ((V * l) <= -2.403333487912658e-111) {
tmp = c0 * sqrt((A * (1.0 / (V * l))));
} else if ((V * l) <= 2.5967983781006628e-263) {
tmp = c0 * sqrt((1.0 / (V / (A / l))));
} else {
tmp = c0 * (sqrt(A) / sqrt((V * l)));
}
return tmp;
}



Bits error versus c0



Bits error versus A



Bits error versus V



Bits error versus l
Results
if (*.f64 V l) < -2.4033334879126581e-111Initial program 14.6
Applied div-inv_binary6414.6
if -2.4033334879126581e-111 < (*.f64 V l) < 2.5967983781006628e-263Initial program 36.0
Applied clear-num_binary6436.0
Simplified26.8
if 2.5967983781006628e-263 < (*.f64 V l) Initial program 13.6
Applied sqrt-div_binary647.0
Final simplification13.7
herbie shell --seed 2022160
(FPCore (c0 A V l)
:name "Henrywood and Agarwal, Equation (3)"
:precision binary64
(* c0 (sqrt (/ A (* V l)))))