c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}
\begin{array}{l}
\mathbf{if}\;V \cdot \ell \leq -3.377932146154755 \cdot 10^{-185}:\\
\;\;\;\;c0 \cdot \sqrt{A \cdot \frac{1}{V \cdot \ell}}\\
\mathbf{elif}\;V \cdot \ell \leq 1.576643 \cdot 10^{-318}:\\
\;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\
\mathbf{elif}\;V \cdot \ell \leq 3.4837495983208395 \cdot 10^{+302}:\\
\;\;\;\;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
(if (<= (* V l) -3.377932146154755e-185)
(* c0 (sqrt (* A (/ 1.0 (* V l)))))
(if (<= (* V l) 1.576643e-318)
(* c0 (sqrt (/ (/ A V) l)))
(if (<= (* V l) 3.4837495983208395e+302)
(* 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 tmp;
if ((V * l) <= -3.377932146154755e-185) {
tmp = c0 * sqrt(A * (1.0 / (V * l)));
} else if ((V * l) <= 1.576643e-318) {
tmp = c0 * sqrt((A / V) / l);
} else if ((V * l) <= 3.4837495983208395e+302) {
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.37793214615475482e-185Initial program 13.6
Applied div-inv_binary6413.6
if -3.37793214615475482e-185 < (*.f64 V l) < 1.5766425e-318Initial program 46.5
Applied associate-/r*_binary6432.2
if 1.5766425e-318 < (*.f64 V l) < 3.48374959832083955e302Initial program 10.4
Applied sqrt-div_binary640.5
if 3.48374959832083955e302 < (*.f64 V l) Initial program 41.1
Applied clear-num_binary6441.1
Simplified21.6
Final simplification11.5
herbie shell --seed 2022020
(FPCore (c0 A V l)
:name "Henrywood and Agarwal, Equation (3)"
:precision binary64
(* c0 (sqrt (/ A (* V l)))))