c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}
\begin{array}{l}
t_0 := c0 \cdot \frac{\sqrt{\frac{A}{V}}}{\sqrt{\ell}}\\
\mathbf{if}\;V \cdot \ell \leq -3.8406686834080733 \cdot 10^{+120}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;V \cdot \ell \leq -3.692963481889076 \cdot 10^{-268}:\\
\;\;\;\;c0 \cdot \sqrt{A \cdot \frac{1}{V \cdot \ell}}\\
\mathbf{elif}\;V \cdot \ell \leq 0:\\
\;\;\;\;t_0\\
\mathbf{elif}\;V \cdot \ell \leq 6.31494061542625 \cdot 10^{+300}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{A}}{\sqrt{V \cdot \ell}}\\
\mathbf{else}:\\
\;\;\;\;c0 \cdot \sqrt{\frac{1}{\frac{V}{\frac{A}{\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 (/ A V)) (sqrt l)))))
(if (<= (* V l) -3.8406686834080733e+120)
t_0
(if (<= (* V l) -3.692963481889076e-268)
(* c0 (sqrt (* A (/ 1.0 (* V l)))))
(if (<= (* V l) 0.0)
t_0
(if (<= (* V l) 6.31494061542625e+300)
(* c0 (/ (sqrt A) (sqrt (* V l))))
(* c0 (sqrt (/ 1.0 (/ V (/ A 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(A / V) / sqrt(l));
double tmp;
if ((V * l) <= -3.8406686834080733e+120) {
tmp = t_0;
} else if ((V * l) <= -3.692963481889076e-268) {
tmp = c0 * sqrt(A * (1.0 / (V * l)));
} else if ((V * l) <= 0.0) {
tmp = t_0;
} else if ((V * l) <= 6.31494061542625e+300) {
tmp = c0 * (sqrt(A) / sqrt(V * l));
} else {
tmp = c0 * sqrt(1.0 / (V / (A / l)));
}
return tmp;
}



Bits error versus c0



Bits error versus A



Bits error versus V



Bits error versus l
Results
if (*.f64 V l) < -3.8406686834080733e120 or -3.692963481889076e-268 < (*.f64 V l) < 0.0Initial program 35.1
Applied add-cube-cbrt_binary6435.3
Applied times-frac_binary6424.0
Applied associate-*r/_binary6424.6
Applied sqrt-div_binary6415.5
Simplified15.2
if -3.8406686834080733e120 < (*.f64 V l) < -3.692963481889076e-268Initial program 8.2
Applied div-inv_binary648.2
if 0.0 < (*.f64 V l) < 6.3149406154262499e300Initial program 10.3
Applied sqrt-div_binary640.8
if 6.3149406154262499e300 < (*.f64 V l) Initial program 40.6
Applied clear-num_binary6440.7
Simplified24.2
Final simplification8.4
herbie shell --seed 2021291
(FPCore (c0 A V l)
:name "Henrywood and Agarwal, Equation (3)"
:precision binary64
(* c0 (sqrt (/ A (* V l)))))