c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}
\begin{array}{l}
t_0 := c0 \cdot \sqrt{\frac{1}{V} \cdot \frac{A}{\ell}}\\
\mathbf{if}\;V \cdot \ell \leq -\infty:\\
\;\;\;\;t_0\\
\mathbf{elif}\;V \cdot \ell \leq -1.120526037751419 \cdot 10^{-177}:\\
\;\;\;\;c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\\
\mathbf{elif}\;V \cdot \ell \leq 3.75 \cdot 10^{-322}:\\
\;\;\;\;t_0\\
\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
(let* ((t_0 (* c0 (sqrt (* (/ 1.0 V) (/ A l))))))
(if (<= (* V l) (- INFINITY))
t_0
(if (<= (* V l) -1.120526037751419e-177)
(* c0 (sqrt (/ A (* V l))))
(if (<= (* V l) 3.75e-322) t_0 (* 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 t_0 = c0 * sqrt((1.0 / V) * (A / l));
double tmp;
if ((V * l) <= -((double) INFINITY)) {
tmp = t_0;
} else if ((V * l) <= -1.120526037751419e-177) {
tmp = c0 * sqrt(A / (V * l));
} else if ((V * l) <= 3.75e-322) {
tmp = t_0;
} 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) < -inf.0 or -1.12052603775141893e-177 < (*.f64 V l) < 3.7549e-322Initial program 44.8
Applied *-un-lft-identity_binary6444.8
Applied times-frac_binary6429.3
if -inf.0 < (*.f64 V l) < -1.12052603775141893e-177Initial program 8.3
if 3.7549e-322 < (*.f64 V l) Initial program 14.1
Applied sqrt-div_binary646.1
Final simplification12.1
herbie shell --seed 2022100
(FPCore (c0 A V l)
:name "Henrywood and Agarwal, Equation (3)"
:precision binary64
(* c0 (sqrt (/ A (* V l)))))