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 -2.9852745842571337 \cdot 10^{+192}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;V \cdot \ell \leq -2.116845488611897 \cdot 10^{-93}:\\
\;\;\;\;c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\\
\mathbf{elif}\;V \cdot \ell \leq 0:\\
\;\;\;\;t_0\\
\mathbf{elif}\;V \cdot \ell \leq 6.09891151415403 \cdot 10^{+266}:\\
\;\;\;\;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) -2.9852745842571337e+192)
t_0
(if (<= (* V l) -2.116845488611897e-93)
(* c0 (sqrt (/ A (* V l))))
(if (<= (* V l) 0.0)
t_0
(if (<= (* V l) 6.09891151415403e+266)
(* 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) <= -2.9852745842571337e+192) {
tmp = t_0;
} else if ((V * l) <= -2.116845488611897e-93) {
tmp = c0 * sqrt(A / (V * l));
} else if ((V * l) <= 0.0) {
tmp = t_0;
} else if ((V * l) <= 6.09891151415403e+266) {
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) < -2.9852745842571337e192 or -2.1168454886118972e-93 < (*.f64 V l) < 0.0Initial program 33.7
Applied add-cube-cbrt_binary6433.9
Applied times-frac_binary6424.7
Applied associate-*r/_binary6425.4
Applied sqrt-div_binary6416.1
Simplified15.8
if -2.9852745842571337e192 < (*.f64 V l) < -2.1168454886118972e-93Initial program 5.0
Applied add-cube-cbrt_binary645.4
Applied times-frac_binary6412.5
Applied add-cube-cbrt_binary6412.7
Applied pow1_binary6412.7
Applied pow1_binary6412.7
Applied pow-prod-down_binary6412.7
Simplified5.0
if 0.0 < (*.f64 V l) < 6.0989115141540304e266Initial program 10.1
Applied sqrt-div_binary640.7
if 6.0989115141540304e266 < (*.f64 V l) Initial program 37.6
Applied add-cube-cbrt_binary6437.7
Applied times-frac_binary6423.1
Applied associate-*l/_binary6423.1
Simplified23.0
Final simplification8.4
herbie shell --seed 2022019
(FPCore (c0 A V l)
:name "Henrywood and Agarwal, Equation (3)"
:precision binary64
(* c0 (sqrt (/ A (* V l)))))