Average Error: 19.0 → 10.0
Time: 5.4s
Precision: binary64
\[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\]
\[\begin{array}{l} \mathbf{if}\;V \cdot \ell \leq -2.959728388715725 \cdot 10^{-276}:\\ \;\;\;\;\left(\left|\frac{\sqrt[3]{A}}{\sqrt[3]{V \cdot \ell}}\right| \cdot c0\right) \cdot \sqrt{\frac{\sqrt[3]{A}}{\sqrt[3]{V \cdot \ell}}}\\ \mathbf{elif}\;V \cdot \ell \leq 3.4628263053763 \cdot 10^{-313}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot \left(\sqrt{A} \cdot \sqrt{\frac{1}{V \cdot \ell}}\right)\\ \end{array}\]
c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}
\begin{array}{l}
\mathbf{if}\;V \cdot \ell \leq -2.959728388715725 \cdot 10^{-276}:\\
\;\;\;\;\left(\left|\frac{\sqrt[3]{A}}{\sqrt[3]{V \cdot \ell}}\right| \cdot c0\right) \cdot \sqrt{\frac{\sqrt[3]{A}}{\sqrt[3]{V \cdot \ell}}}\\

\mathbf{elif}\;V \cdot \ell \leq 3.4628263053763 \cdot 10^{-313}:\\
\;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\

\mathbf{else}:\\
\;\;\;\;c0 \cdot \left(\sqrt{A} \cdot \sqrt{\frac{1}{V \cdot \ell}}\right)\\

\end{array}
(FPCore (c0 A V l) :precision binary64 (* c0 (sqrt (/ A (* V l)))))
(FPCore (c0 A V l)
 :precision binary64
 (if (<= (* V l) -2.959728388715725e-276)
   (*
    (* (fabs (/ (cbrt A) (cbrt (* V l)))) c0)
    (sqrt (/ (cbrt A) (cbrt (* V l)))))
   (if (<= (* V l) 3.4628263053763e-313)
     (* c0 (sqrt (/ (/ A V) l)))
     (* c0 (* (sqrt A) (sqrt (/ 1.0 (* V l))))))))
double code(double c0, double A, double V, double l) {
	return ((double) (c0 * ((double) sqrt((A / ((double) (V * l)))))));
}
double code(double c0, double A, double V, double l) {
	double VAR;
	if ((((double) (V * l)) <= -2.959728388715725e-276)) {
		VAR = ((double) (((double) (((double) fabs((((double) cbrt(A)) / ((double) cbrt(((double) (V * l))))))) * c0)) * ((double) sqrt((((double) cbrt(A)) / ((double) cbrt(((double) (V * l)))))))));
	} else {
		double VAR_1;
		if ((((double) (V * l)) <= 3.4628263053763e-313)) {
			VAR_1 = ((double) (c0 * ((double) sqrt(((A / V) / l)))));
		} else {
			VAR_1 = ((double) (c0 * ((double) (((double) sqrt(A)) * ((double) sqrt((1.0 / ((double) (V * l)))))))));
		}
		VAR = VAR_1;
	}
	return VAR;
}

Error

Bits error versus c0

Bits error versus A

Bits error versus V

Bits error versus l

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Split input into 3 regimes
  2. if (* V l) < -2.95972838871572515e-276

    1. Initial program 14.1

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\]
    2. Using strategy rm
    3. Applied add-cube-cbrt14.5

      \[\leadsto c0 \cdot \sqrt{\color{blue}{\left(\sqrt[3]{\frac{A}{V \cdot \ell}} \cdot \sqrt[3]{\frac{A}{V \cdot \ell}}\right) \cdot \sqrt[3]{\frac{A}{V \cdot \ell}}}}\]
    4. Applied sqrt-prod14.5

      \[\leadsto c0 \cdot \color{blue}{\left(\sqrt{\sqrt[3]{\frac{A}{V \cdot \ell}} \cdot \sqrt[3]{\frac{A}{V \cdot \ell}}} \cdot \sqrt{\sqrt[3]{\frac{A}{V \cdot \ell}}}\right)}\]
    5. Applied associate-*r*14.5

      \[\leadsto \color{blue}{\left(c0 \cdot \sqrt{\sqrt[3]{\frac{A}{V \cdot \ell}} \cdot \sqrt[3]{\frac{A}{V \cdot \ell}}}\right) \cdot \sqrt{\sqrt[3]{\frac{A}{V \cdot \ell}}}}\]
    6. Simplified14.5

      \[\leadsto \color{blue}{\left(\left|\sqrt[3]{\frac{A}{V \cdot \ell}}\right| \cdot c0\right)} \cdot \sqrt{\sqrt[3]{\frac{A}{V \cdot \ell}}}\]
    7. Using strategy rm
    8. Applied cbrt-div14.5

      \[\leadsto \left(\left|\color{blue}{\frac{\sqrt[3]{A}}{\sqrt[3]{V \cdot \ell}}}\right| \cdot c0\right) \cdot \sqrt{\sqrt[3]{\frac{A}{V \cdot \ell}}}\]
    9. Using strategy rm
    10. Applied cbrt-div7.3

      \[\leadsto \left(\left|\frac{\sqrt[3]{A}}{\sqrt[3]{V \cdot \ell}}\right| \cdot c0\right) \cdot \sqrt{\color{blue}{\frac{\sqrt[3]{A}}{\sqrt[3]{V \cdot \ell}}}}\]

    if -2.95972838871572515e-276 < (* V l) < 3.46282630538e-313

    1. Initial program 57.2

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\]
    2. Using strategy rm
    3. Applied associate-/r*37.1

      \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{\frac{A}{V}}{\ell}}}\]

    if 3.46282630538e-313 < (* V l)

    1. Initial program 15.4

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\]
    2. Using strategy rm
    3. Applied div-inv15.6

      \[\leadsto c0 \cdot \sqrt{\color{blue}{A \cdot \frac{1}{V \cdot \ell}}}\]
    4. Applied sqrt-prod6.8

      \[\leadsto c0 \cdot \color{blue}{\left(\sqrt{A} \cdot \sqrt{\frac{1}{V \cdot \ell}}\right)}\]
  3. Recombined 3 regimes into one program.
  4. Final simplification10.0

    \[\leadsto \begin{array}{l} \mathbf{if}\;V \cdot \ell \leq -2.959728388715725 \cdot 10^{-276}:\\ \;\;\;\;\left(\left|\frac{\sqrt[3]{A}}{\sqrt[3]{V \cdot \ell}}\right| \cdot c0\right) \cdot \sqrt{\frac{\sqrt[3]{A}}{\sqrt[3]{V \cdot \ell}}}\\ \mathbf{elif}\;V \cdot \ell \leq 3.4628263053763 \cdot 10^{-313}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot \left(\sqrt{A} \cdot \sqrt{\frac{1}{V \cdot \ell}}\right)\\ \end{array}\]

Reproduce

herbie shell --seed 2020198 
(FPCore (c0 A V l)
  :name "Henrywood and Agarwal, Equation (3)"
  :precision binary64
  (* c0 (sqrt (/ A (* V l)))))