c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}
\begin{array}{l}
t_0 := \sqrt{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}\\
t_1 := \frac{A}{V \cdot \ell}\\
t_2 := \frac{1}{\sqrt[3]{\ell}}\\
\mathbf{if}\;t_1 \leq 2.5 \cdot 10^{-323}:\\
\;\;\;\;\frac{c0 \cdot \sqrt{\frac{A}{V} \cdot t_2}}{t_0}\\
\mathbf{elif}\;t_1 \leq 3.020884093980358 \cdot 10^{+304}:\\
\;\;\;\;c0 \cdot \sqrt{t_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{c0 \cdot \sqrt{t_2 \cdot \left(A \cdot \frac{1}{V}\right)}}{t_0}\\
\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 (* (cbrt l) (cbrt l))))
(t_1 (/ A (* V l)))
(t_2 (/ 1.0 (cbrt l))))
(if (<= t_1 2.5e-323)
(/ (* c0 (sqrt (* (/ A V) t_2))) t_0)
(if (<= t_1 3.020884093980358e+304)
(* c0 (sqrt t_1))
(/ (* c0 (sqrt (* t_2 (* A (/ 1.0 V))))) t_0)))))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(cbrt(l) * cbrt(l));
double t_1 = A / (V * l);
double t_2 = 1.0 / cbrt(l);
double tmp;
if (t_1 <= 2.5e-323) {
tmp = (c0 * sqrt((A / V) * t_2)) / t_0;
} else if (t_1 <= 3.020884093980358e+304) {
tmp = c0 * sqrt(t_1);
} else {
tmp = (c0 * sqrt(t_2 * (A * (1.0 / V)))) / t_0;
}
return tmp;
}



Bits error versus c0



Bits error versus A



Bits error versus V



Bits error versus l
Results
if (/.f64 A (*.f64 V l)) < 2.47033e-323Initial program 42.0
Applied *-un-lft-identity_binary6442.0
Applied times-frac_binary6429.7
Applied add-cube-cbrt_binary6429.8
Applied *-un-lft-identity_binary6429.8
Applied times-frac_binary6429.8
Applied associate-*r*_binary6435.4
Applied un-div-inv_binary6435.4
Applied associate-*l/_binary6429.8
Applied sqrt-div_binary6419.6
Applied associate-*r/_binary6419.7
Applied div-inv_binary6419.7
Applied associate-*r*_binary6418.1
Simplified18.1
if 2.47033e-323 < (/.f64 A (*.f64 V l)) < 3.02088409398035799e304Initial program 0.8
Applied *-un-lft-identity_binary640.8
Applied associate-*l*_binary640.8
Simplified0.8
if 3.02088409398035799e304 < (/.f64 A (*.f64 V l)) Initial program 63.4
Applied *-un-lft-identity_binary6463.4
Applied times-frac_binary6447.8
Applied add-cube-cbrt_binary6447.9
Applied *-un-lft-identity_binary6447.9
Applied times-frac_binary6447.9
Applied associate-*r*_binary6457.9
Applied un-div-inv_binary6457.9
Applied associate-*l/_binary6448.2
Applied sqrt-div_binary6431.9
Applied associate-*r/_binary6431.9
Applied div-inv_binary6431.9
Applied associate-*r*_binary6429.0
Final simplification8.9
herbie shell --seed 2022004
(FPCore (c0 A V l)
:name "Henrywood and Agarwal, Equation (3)"
:precision binary64
(* c0 (sqrt (/ A (* V l)))))