Average Error: 19.4 → 8.6
Time: 5.5s
Precision: 64
\[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\]
\[\begin{array}{l} \mathbf{if}\;V \cdot \ell \le -1.69984137771513769 \cdot 10^{303}:\\ \;\;\;\;\frac{c0}{\sqrt{\sqrt{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}} \cdot \frac{\sqrt{\frac{1}{V} \cdot \frac{A}{\sqrt[3]{\ell}}}}{\sqrt{\sqrt{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}}\\ \mathbf{elif}\;V \cdot \ell \le -1.1396964155309059 \cdot 10^{-95}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{1}{\frac{V \cdot \ell}{A}}}\\ \mathbf{elif}\;V \cdot \ell \le -0.0:\\ \;\;\;\;\frac{c0 \cdot \sqrt{\frac{\frac{\sqrt[3]{A} \cdot \sqrt[3]{A}}{\sqrt[3]{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}}{V} \cdot \frac{\sqrt[3]{A}}{\sqrt[3]{\sqrt[3]{\ell}}}}}{\sqrt{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{c0 \cdot \frac{\sqrt{A}}{\sqrt{V \cdot \sqrt[3]{\ell}}}}{\sqrt{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}\\ \end{array}\]
c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}
\begin{array}{l}
\mathbf{if}\;V \cdot \ell \le -1.69984137771513769 \cdot 10^{303}:\\
\;\;\;\;\frac{c0}{\sqrt{\sqrt{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}} \cdot \frac{\sqrt{\frac{1}{V} \cdot \frac{A}{\sqrt[3]{\ell}}}}{\sqrt{\sqrt{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}}\\

\mathbf{elif}\;V \cdot \ell \le -1.1396964155309059 \cdot 10^{-95}:\\
\;\;\;\;c0 \cdot \sqrt{\frac{1}{\frac{V \cdot \ell}{A}}}\\

\mathbf{elif}\;V \cdot \ell \le -0.0:\\
\;\;\;\;\frac{c0 \cdot \sqrt{\frac{\frac{\sqrt[3]{A} \cdot \sqrt[3]{A}}{\sqrt[3]{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}}{V} \cdot \frac{\sqrt[3]{A}}{\sqrt[3]{\sqrt[3]{\ell}}}}}{\sqrt{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}\\

\mathbf{else}:\\
\;\;\;\;\frac{c0 \cdot \frac{\sqrt{A}}{\sqrt{V \cdot \sqrt[3]{\ell}}}}{\sqrt{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}\\

\end{array}
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 VAR;
	if (((V * l) <= -1.6998413777151377e+303)) {
		VAR = ((c0 / sqrt(sqrt((cbrt(l) * cbrt(l))))) * (sqrt(((1.0 / V) * (A / cbrt(l)))) / sqrt(sqrt((cbrt(l) * cbrt(l))))));
	} else {
		double VAR_1;
		if (((V * l) <= -1.1396964155309059e-95)) {
			VAR_1 = (c0 * sqrt((1.0 / ((V * l) / A))));
		} else {
			double VAR_2;
			if (((V * l) <= -0.0)) {
				VAR_2 = ((c0 * sqrt(((((cbrt(A) * cbrt(A)) / cbrt((cbrt(l) * cbrt(l)))) / V) * (cbrt(A) / cbrt(cbrt(l)))))) / sqrt((cbrt(l) * cbrt(l))));
			} else {
				VAR_2 = ((c0 * (sqrt(A) / sqrt((V * cbrt(l))))) / sqrt((cbrt(l) * cbrt(l))));
			}
			VAR_1 = VAR_2;
		}
		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 4 regimes
  2. if (* V l) < -1.6998413777151377e+303

    1. Initial program 42.1

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\]
    2. Using strategy rm
    3. Applied *-un-lft-identity42.1

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

      \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1}{V} \cdot \frac{A}{\ell}}}\]
    5. Using strategy rm
    6. Applied add-cube-cbrt22.0

      \[\leadsto c0 \cdot \sqrt{\frac{1}{V} \cdot \frac{A}{\color{blue}{\left(\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}\right) \cdot \sqrt[3]{\ell}}}}\]
    7. Applied *-un-lft-identity22.0

      \[\leadsto c0 \cdot \sqrt{\frac{1}{V} \cdot \frac{\color{blue}{1 \cdot A}}{\left(\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}\right) \cdot \sqrt[3]{\ell}}}\]
    8. Applied times-frac22.0

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

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

      \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{\frac{1}{V}}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}} \cdot \frac{A}{\sqrt[3]{\ell}}}\]
    11. Using strategy rm
    12. Applied associate-*l/22.1

      \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{\frac{1}{V} \cdot \frac{A}{\sqrt[3]{\ell}}}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}}\]
    13. Applied sqrt-div13.0

      \[\leadsto c0 \cdot \color{blue}{\frac{\sqrt{\frac{1}{V} \cdot \frac{A}{\sqrt[3]{\ell}}}}{\sqrt{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}}\]
    14. Applied associate-*r/13.1

      \[\leadsto \color{blue}{\frac{c0 \cdot \sqrt{\frac{1}{V} \cdot \frac{A}{\sqrt[3]{\ell}}}}{\sqrt{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}}\]
    15. Using strategy rm
    16. Applied add-sqr-sqrt13.2

      \[\leadsto \frac{c0 \cdot \sqrt{\frac{1}{V} \cdot \frac{A}{\sqrt[3]{\ell}}}}{\color{blue}{\sqrt{\sqrt{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}} \cdot \sqrt{\sqrt{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}}}\]
    17. Applied times-frac13.1

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

    if -1.6998413777151377e+303 < (* V l) < -1.1396964155309059e-95

    1. Initial program 7.7

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

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

    if -1.1396964155309059e-95 < (* V l) < -0.0

    1. Initial program 36.9

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\]
    2. Using strategy rm
    3. Applied *-un-lft-identity36.9

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

      \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1}{V} \cdot \frac{A}{\ell}}}\]
    5. Using strategy rm
    6. Applied add-cube-cbrt28.3

      \[\leadsto c0 \cdot \sqrt{\frac{1}{V} \cdot \frac{A}{\color{blue}{\left(\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}\right) \cdot \sqrt[3]{\ell}}}}\]
    7. Applied *-un-lft-identity28.3

      \[\leadsto c0 \cdot \sqrt{\frac{1}{V} \cdot \frac{\color{blue}{1 \cdot A}}{\left(\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}\right) \cdot \sqrt[3]{\ell}}}\]
    8. Applied times-frac28.3

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

      \[\leadsto c0 \cdot \sqrt{\color{blue}{\left(\frac{1}{V} \cdot \frac{1}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}\right) \cdot \frac{A}{\sqrt[3]{\ell}}}}\]
    10. Simplified32.9

      \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{\frac{1}{V}}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}} \cdot \frac{A}{\sqrt[3]{\ell}}}\]
    11. Using strategy rm
    12. Applied associate-*l/26.9

      \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{\frac{1}{V} \cdot \frac{A}{\sqrt[3]{\ell}}}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}}\]
    13. Applied sqrt-div17.2

      \[\leadsto c0 \cdot \color{blue}{\frac{\sqrt{\frac{1}{V} \cdot \frac{A}{\sqrt[3]{\ell}}}}{\sqrt{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}}\]
    14. Applied associate-*r/18.0

      \[\leadsto \color{blue}{\frac{c0 \cdot \sqrt{\frac{1}{V} \cdot \frac{A}{\sqrt[3]{\ell}}}}{\sqrt{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}}\]
    15. Using strategy rm
    16. Applied add-cube-cbrt18.0

      \[\leadsto \frac{c0 \cdot \sqrt{\frac{1}{V} \cdot \frac{A}{\sqrt[3]{\color{blue}{\left(\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}\right) \cdot \sqrt[3]{\ell}}}}}}{\sqrt{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}\]
    17. Applied cbrt-prod18.1

      \[\leadsto \frac{c0 \cdot \sqrt{\frac{1}{V} \cdot \frac{A}{\color{blue}{\sqrt[3]{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}} \cdot \sqrt[3]{\sqrt[3]{\ell}}}}}}{\sqrt{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}\]
    18. Applied add-cube-cbrt18.2

      \[\leadsto \frac{c0 \cdot \sqrt{\frac{1}{V} \cdot \frac{\color{blue}{\left(\sqrt[3]{A} \cdot \sqrt[3]{A}\right) \cdot \sqrt[3]{A}}}{\sqrt[3]{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}} \cdot \sqrt[3]{\sqrt[3]{\ell}}}}}{\sqrt{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}\]
    19. Applied times-frac18.2

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

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

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

    if -0.0 < (* V l)

    1. Initial program 15.4

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\]
    2. Using strategy rm
    3. Applied *-un-lft-identity15.4

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

      \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1}{V} \cdot \frac{A}{\ell}}}\]
    5. Using strategy rm
    6. Applied add-cube-cbrt18.2

      \[\leadsto c0 \cdot \sqrt{\frac{1}{V} \cdot \frac{A}{\color{blue}{\left(\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}\right) \cdot \sqrt[3]{\ell}}}}\]
    7. Applied *-un-lft-identity18.2

      \[\leadsto c0 \cdot \sqrt{\frac{1}{V} \cdot \frac{\color{blue}{1 \cdot A}}{\left(\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}\right) \cdot \sqrt[3]{\ell}}}\]
    8. Applied times-frac18.2

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

      \[\leadsto c0 \cdot \sqrt{\color{blue}{\left(\frac{1}{V} \cdot \frac{1}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}\right) \cdot \frac{A}{\sqrt[3]{\ell}}}}\]
    10. Simplified15.2

      \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{\frac{1}{V}}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}} \cdot \frac{A}{\sqrt[3]{\ell}}}\]
    11. Using strategy rm
    12. Applied associate-*l/16.6

      \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{\frac{1}{V} \cdot \frac{A}{\sqrt[3]{\ell}}}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}}\]
    13. Applied sqrt-div12.7

      \[\leadsto c0 \cdot \color{blue}{\frac{\sqrt{\frac{1}{V} \cdot \frac{A}{\sqrt[3]{\ell}}}}{\sqrt{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}}\]
    14. Applied associate-*r/13.9

      \[\leadsto \color{blue}{\frac{c0 \cdot \sqrt{\frac{1}{V} \cdot \frac{A}{\sqrt[3]{\ell}}}}{\sqrt{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}}\]
    15. Using strategy rm
    16. Applied frac-times13.2

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

      \[\leadsto \frac{c0 \cdot \color{blue}{\frac{\sqrt{1 \cdot A}}{\sqrt{V \cdot \sqrt[3]{\ell}}}}}{\sqrt{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}\]
    18. Simplified4.4

      \[\leadsto \frac{c0 \cdot \frac{\color{blue}{\sqrt{A}}}{\sqrt{V \cdot \sqrt[3]{\ell}}}}{\sqrt{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}\]
  3. Recombined 4 regimes into one program.
  4. Final simplification8.6

    \[\leadsto \begin{array}{l} \mathbf{if}\;V \cdot \ell \le -1.69984137771513769 \cdot 10^{303}:\\ \;\;\;\;\frac{c0}{\sqrt{\sqrt{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}} \cdot \frac{\sqrt{\frac{1}{V} \cdot \frac{A}{\sqrt[3]{\ell}}}}{\sqrt{\sqrt{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}}\\ \mathbf{elif}\;V \cdot \ell \le -1.1396964155309059 \cdot 10^{-95}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{1}{\frac{V \cdot \ell}{A}}}\\ \mathbf{elif}\;V \cdot \ell \le -0.0:\\ \;\;\;\;\frac{c0 \cdot \sqrt{\frac{\frac{\sqrt[3]{A} \cdot \sqrt[3]{A}}{\sqrt[3]{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}}{V} \cdot \frac{\sqrt[3]{A}}{\sqrt[3]{\sqrt[3]{\ell}}}}}{\sqrt{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{c0 \cdot \frac{\sqrt{A}}{\sqrt{V \cdot \sqrt[3]{\ell}}}}{\sqrt{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}\\ \end{array}\]

Reproduce

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