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 -1.5714420946376377 \cdot 10^{+207}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;V \cdot \ell \leq -1.5645807136330107 \cdot 10^{-87}:\\
\;\;\;\;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 8.488026387056449 \cdot 10^{+293}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{A}}{\sqrt{V \cdot \ell}}\\
\mathbf{else}:\\
\;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{\ell}}{V}}\\
\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) -1.5714420946376377e+207)
t_0
(if (<= (* V l) -1.5645807136330107e-87)
(* c0 (sqrt (* A (/ 1.0 (* V l)))))
(if (<= (* V l) 0.0)
t_0
(if (<= (* V l) 8.488026387056449e+293)
(* c0 (/ (sqrt A) (sqrt (* V l))))
(* c0 (sqrt (/ (/ A l) V)))))))))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) <= -1.5714420946376377e+207) {
tmp = t_0;
} else if ((V * l) <= -1.5645807136330107e-87) {
tmp = c0 * sqrt(A * (1.0 / (V * l)));
} else if ((V * l) <= 0.0) {
tmp = t_0;
} else if ((V * l) <= 8.488026387056449e+293) {
tmp = c0 * (sqrt(A) / sqrt(V * l));
} else {
tmp = c0 * sqrt((A / l) / V);
}
return tmp;
}



Bits error versus c0



Bits error versus A



Bits error versus V



Bits error versus l
Results
if (*.f64 V l) < -1.57144209463763766e207 or -1.56458071363301071e-87 < (*.f64 V l) < -0.0Initial program 35.1
Applied add-cube-cbrt_binary6435.3
Applied times-frac_binary6425.0
Applied associate-*r/_binary6425.5
Applied sqrt-div_binary6416.1
Simplified15.8
if -1.57144209463763766e207 < (*.f64 V l) < -1.56458071363301071e-87Initial program 5.4
Applied div-inv_binary645.4
if -0.0 < (*.f64 V l) < 8.48802638705644869e293Initial program 9.9
Applied sqrt-div_binary640.7
if 8.48802638705644869e293 < (*.f64 V l) Initial program 40.4
Applied add-cube-cbrt_binary6440.4
Applied times-frac_binary6423.0
Applied associate-*l/_binary6423.0
Simplified22.9
Final simplification8.3
herbie shell --seed 2022094
(FPCore (c0 A V l)
:name "Henrywood and Agarwal, Equation (3)"
:precision binary64
(* c0 (sqrt (/ A (* V l)))))