c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\begin{array}{l}
\mathbf{if}\;V \cdot \ell \leq -1.564462525671556 \cdot 10^{+129}:\\
\;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\
\mathbf{elif}\;V \cdot \ell \leq -4.7109046042698 \cdot 10^{-313}:\\
\;\;\;\;c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\\
\mathbf{elif}\;V \cdot \ell \leq 2.2340956813037 \cdot 10^{-318}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{\frac{A}{V}}}{\sqrt{\ell}}\\
\mathbf{elif}\;V \cdot \ell \leq 1.3164010340907022 \cdot 10^{+306}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{A}}{\sqrt{V \cdot \ell}}\\
\mathbf{else}:\\
\;\;\;\;c0 \cdot \sqrt{\frac{1}{V} \cdot \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) -1.564462525671556e+129)
(* c0 (sqrt (/ (/ A V) l)))
(if (<= (* V l) -4.7109046042698e-313)
(* c0 (sqrt (/ A (* V l))))
(if (<= (* V l) 2.2340956813037e-318)
(* c0 (/ (sqrt (/ A V)) (sqrt l)))
(if (<= (* V l) 1.3164010340907022e+306)
(* 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) <= -1.564462525671556e+129) {
tmp = c0 * sqrt((A / V) / l);
} else if ((V * l) <= -4.7109046042698e-313) {
tmp = c0 * sqrt(A / (V * l));
} else if ((V * l) <= 2.2340956813037e-318) {
tmp = c0 * (sqrt(A / V) / sqrt(l));
} else if ((V * l) <= 1.3164010340907022e+306) {
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) < -1.564462525671556e129Initial program 25.6
rmApplied associate-/r*_binary64_104520.0
if -1.564462525671556e129 < (*.f64 V l) < -4.71090460427e-313Initial program 8.8
if -4.71090460427e-313 < (*.f64 V l) < 2.2340957e-318Initial program 63.0
rmApplied *-un-lft-identity_binary64_110163.0
Applied times-frac_binary64_110738.4
rmApplied associate-*r/_binary64_104338.4
Applied sqrt-div_binary64_111839.9
Simplified39.9
if 2.2340957e-318 < (*.f64 V l) < 1.31640103409070217e306Initial program 10.8
rmApplied sqrt-div_binary64_11180.6
if 1.31640103409070217e306 < (*.f64 V l) Initial program 42.7
rmApplied *-un-lft-identity_binary64_110142.7
Applied times-frac_binary64_110724.1
Final simplification11.6
herbie shell --seed 2020356
(FPCore (c0 A V l)
:name "Henrywood and Agarwal, Equation (3)"
:precision binary64
(* c0 (sqrt (/ A (* V l)))))