c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}
\begin{array}{l}
t_0 := \sqrt{\frac{A}{V}}\\
\mathbf{if}\;V \cdot \ell \leq -2.8755276648831163 \cdot 10^{+142}:\\
\;\;\;\;c0 \cdot \frac{t_0}{\sqrt{\ell}}\\
\mathbf{elif}\;V \cdot \ell \leq -9.36666352430678 \cdot 10^{-102}:\\
\;\;\;\;c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\\
\mathbf{elif}\;V \cdot \ell \leq 0:\\
\;\;\;\;\frac{c0 \cdot t_0}{\sqrt{\ell}}\\
\mathbf{elif}\;V \cdot \ell \leq 4.2331440472618975 \cdot 10^{+297}:\\
\;\;\;\;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 (sqrt (/ A V))))
(if (<= (* V l) -2.8755276648831163e+142)
(* c0 (/ t_0 (sqrt l)))
(if (<= (* V l) -9.36666352430678e-102)
(* c0 (sqrt (/ A (* V l))))
(if (<= (* V l) 0.0)
(/ (* c0 t_0) (sqrt l))
(if (<= (* V l) 4.2331440472618975e+297)
(* 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 = sqrt(A / V);
double tmp;
if ((V * l) <= -2.8755276648831163e+142) {
tmp = c0 * (t_0 / sqrt(l));
} else if ((V * l) <= -9.36666352430678e-102) {
tmp = c0 * sqrt(A / (V * l));
} else if ((V * l) <= 0.0) {
tmp = (c0 * t_0) / sqrt(l);
} else if ((V * l) <= 4.2331440472618975e+297) {
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.8755276648831163e142Initial program 26.1
Applied add-cube-cbrt_binary6426.2
Applied times-frac_binary6418.5
Applied associate-*r/_binary6419.3
Applied sqrt-div_binary6410.1
Simplified9.8
if -2.8755276648831163e142 < (*.f64 V l) < -9.3666635243067795e-102Initial program 3.6
Applied *-un-lft-identity_binary643.6
Applied associate-*l*_binary643.6
Simplified3.6
if -9.3666635243067795e-102 < (*.f64 V l) < -0.0Initial program 37.7
Applied add-cube-cbrt_binary6437.9
Applied times-frac_binary6426.7
Applied associate-*r/_binary6427.7
Applied sqrt-div_binary6420.2
Applied associate-*r/_binary6421.4
Simplified21.1
if -0.0 < (*.f64 V l) < 4.23314404726189754e297Initial program 10.6
Applied sqrt-div_binary640.8
if 4.23314404726189754e297 < (*.f64 V l) Initial program 41.4
Applied add-cube-cbrt_binary6441.4
Applied times-frac_binary6423.1
Applied associate-*l/_binary6423.1
Simplified23.0
Final simplification8.4
herbie shell --seed 2022097
(FPCore (c0 A V l)
:name "Henrywood and Agarwal, Equation (3)"
:precision binary64
(* c0 (sqrt (/ A (* V l)))))