c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\begin{array}{l}
\mathbf{if}\;V \cdot \ell \leq -1.8224640885465417 \cdot 10^{+236}:\\
\;\;\;\;\frac{\sqrt{\frac{A}{\ell}} \cdot c0}{\sqrt{V}}\\
\mathbf{elif}\;V \cdot \ell \leq -1.1485669237723498 \cdot 10^{-254}:\\
\;\;\;\;c0 \cdot \sqrt{A \cdot \frac{1}{V \cdot \ell}}\\
\mathbf{elif}\;V \cdot \ell \leq 0:\\
\;\;\;\;\frac{\sqrt{\frac{A}{\ell}} \cdot c0}{\sqrt{V}}\\
\mathbf{elif}\;V \cdot \ell \leq 7.596503550601429 \cdot 10^{+267}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{A}}{\sqrt{V \cdot \ell}}\\
\mathbf{else}:\\
\;\;\;\;c0 \cdot \sqrt{\frac{A}{\ell} \cdot \frac{1}{V}}\\
\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.8224640885465417e+236)
(/ (* (sqrt (/ A l)) c0) (sqrt V))
(if (<= (* V l) -1.1485669237723498e-254)
(* c0 (sqrt (* A (/ 1.0 (* V l)))))
(if (<= (* V l) 0.0)
(/ (* (sqrt (/ A l)) c0) (sqrt V))
(if (<= (* V l) 7.596503550601429e+267)
(* c0 (/ (sqrt A) (sqrt (* V l))))
(* c0 (sqrt (* (/ A l) (/ 1.0 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 tmp;
if ((V * l) <= -1.8224640885465417e+236) {
tmp = (sqrt(A / l) * c0) / sqrt(V);
} else if ((V * l) <= -1.1485669237723498e-254) {
tmp = c0 * sqrt(A * (1.0 / (V * l)));
} else if ((V * l) <= 0.0) {
tmp = (sqrt(A / l) * c0) / sqrt(V);
} else if ((V * l) <= 7.596503550601429e+267) {
tmp = c0 * (sqrt(A) / sqrt(V * l));
} else {
tmp = c0 * sqrt((A / l) * (1.0 / 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.82246408854654173e236 or -1.14856692377234979e-254 < (*.f64 V l) < 0.0Initial program 43.5
rmApplied *-un-lft-identity_binary6443.5
Applied times-frac_binary6426.6
rmApplied associate-*l/_binary6426.5
Applied sqrt-div_binary6437.8
Applied associate-*r/_binary6438.2
Simplified38.2
if -1.82246408854654173e236 < (*.f64 V l) < -1.14856692377234979e-254Initial program 8.4
rmApplied div-inv_binary648.4
if 0.0 < (*.f64 V l) < 7.5965035506014294e267Initial program 9.6
rmApplied sqrt-div_binary640.8
if 7.5965035506014294e267 < (*.f64 V l) Initial program 37.4
rmApplied *-un-lft-identity_binary6437.4
Applied times-frac_binary6423.0
Final simplification13.1
herbie shell --seed 2020233
(FPCore (c0 A V l)
:name "Henrywood and Agarwal, Equation (3)"
:precision binary64
(* c0 (sqrt (/ A (* V l)))))