Average Error: 19.5 → 11.9
Time: 4.5s
Precision: 64
\[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\]
\[\begin{array}{l} \mathbf{if}\;V \cdot \ell \le -4.0254141507214393 \cdot 10^{99}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{1}{V} \cdot \frac{A}{\ell}}\\ \mathbf{elif}\;V \cdot \ell \le -1.3926274061905453 \cdot 10^{-77}:\\ \;\;\;\;\left(\left|\sqrt[3]{\frac{A}{V \cdot \ell}}\right| \cdot c0\right) \cdot \sqrt{\sqrt[3]{\frac{A}{V \cdot \ell}}}\\ \mathbf{elif}\;V \cdot \ell \le -1.55927 \cdot 10^{-320}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{A}{V} \cdot \frac{1}{\ell}}\\ \mathbf{elif}\;V \cdot \ell \le 1.50349399394837436 \cdot 10^{-304}:\\ \;\;\;\;\frac{c0 \cdot \sqrt{\frac{A}{V}}}{\sqrt{\ell}}\\ \mathbf{elif}\;V \cdot \ell \le 1.3905296973911986 \cdot 10^{296}:\\ \;\;\;\;c0 \cdot \left(\sqrt{A} \cdot \sqrt{\frac{1}{V \cdot \ell}}\right)\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot \frac{\left|\frac{\sqrt[3]{A}}{\sqrt[3]{\ell}} \cdot {A}^{\frac{1}{6}}\right|}{\sqrt{V \cdot \sqrt[3]{\ell}}}\\ \end{array}\]
c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}
\begin{array}{l}
\mathbf{if}\;V \cdot \ell \le -4.0254141507214393 \cdot 10^{99}:\\
\;\;\;\;c0 \cdot \sqrt{\frac{1}{V} \cdot \frac{A}{\ell}}\\

\mathbf{elif}\;V \cdot \ell \le -1.3926274061905453 \cdot 10^{-77}:\\
\;\;\;\;\left(\left|\sqrt[3]{\frac{A}{V \cdot \ell}}\right| \cdot c0\right) \cdot \sqrt{\sqrt[3]{\frac{A}{V \cdot \ell}}}\\

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

\mathbf{elif}\;V \cdot \ell \le 1.50349399394837436 \cdot 10^{-304}:\\
\;\;\;\;\frac{c0 \cdot \sqrt{\frac{A}{V}}}{\sqrt{\ell}}\\

\mathbf{elif}\;V \cdot \ell \le 1.3905296973911986 \cdot 10^{296}:\\
\;\;\;\;c0 \cdot \left(\sqrt{A} \cdot \sqrt{\frac{1}{V \cdot \ell}}\right)\\

\mathbf{else}:\\
\;\;\;\;c0 \cdot \frac{\left|\frac{\sqrt[3]{A}}{\sqrt[3]{\ell}} \cdot {A}^{\frac{1}{6}}\right|}{\sqrt{V \cdot \sqrt[3]{\ell}}}\\

\end{array}
double code(double c0, double A, double V, double l) {
	return ((double) (c0 * ((double) sqrt(((double) (A / ((double) (V * l))))))));
}
double code(double c0, double A, double V, double l) {
	double VAR;
	if ((((double) (V * l)) <= -4.0254141507214393e+99)) {
		VAR = ((double) (c0 * ((double) sqrt(((double) (((double) (1.0 / V)) * ((double) (A / l))))))));
	} else {
		double VAR_1;
		if ((((double) (V * l)) <= -1.3926274061905453e-77)) {
			VAR_1 = ((double) (((double) (((double) fabs(((double) cbrt(((double) (A / ((double) (V * l)))))))) * c0)) * ((double) sqrt(((double) cbrt(((double) (A / ((double) (V * l))))))))));
		} else {
			double VAR_2;
			if ((((double) (V * l)) <= -1.559271178275e-320)) {
				VAR_2 = ((double) (c0 * ((double) sqrt(((double) (((double) (A / V)) * ((double) (1.0 / l))))))));
			} else {
				double VAR_3;
				if ((((double) (V * l)) <= 1.5034939939483744e-304)) {
					VAR_3 = ((double) (((double) (c0 * ((double) sqrt(((double) (A / V)))))) / ((double) sqrt(l))));
				} else {
					double VAR_4;
					if ((((double) (V * l)) <= 1.3905296973911986e+296)) {
						VAR_4 = ((double) (c0 * ((double) (((double) sqrt(A)) * ((double) sqrt(((double) (1.0 / ((double) (V * l))))))))));
					} else {
						VAR_4 = ((double) (c0 * ((double) (((double) fabs(((double) (((double) (((double) cbrt(A)) / ((double) cbrt(l)))) * ((double) pow(A, 0.16666666666666666)))))) / ((double) sqrt(((double) (V * ((double) cbrt(l))))))))));
					}
					VAR_3 = VAR_4;
				}
				VAR_2 = VAR_3;
			}
			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 6 regimes
  2. if (* V l) < -4.0254141507214393e+99

    1. Initial program 22.9

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

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

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

    if -4.0254141507214393e+99 < (* V l) < -1.3926274061905453e-77

    1. Initial program 3.2

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

      \[\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-prod3.7

      \[\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*3.7

      \[\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. Simplified3.7

      \[\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}}}\]

    if -1.3926274061905453e-77 < (* V l) < -1.559271178275e-320

    1. Initial program 16.4

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

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

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

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

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

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

    if -1.559271178275e-320 < (* V l) < 1.5034939939483744e-304

    1. Initial program 62.0

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

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

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

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

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

      \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{A}{V}} \cdot \frac{1}{\ell}}\]
    9. Using strategy rm
    10. Applied un-div-inv39.9

      \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{\frac{A}{V}}{\ell}}}\]
    11. Applied sqrt-div39.7

      \[\leadsto c0 \cdot \color{blue}{\frac{\sqrt{\frac{A}{V}}}{\sqrt{\ell}}}\]
    12. Applied associate-*r/40.0

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

    if 1.5034939939483744e-304 < (* V l) < 1.3905296973911986e+296

    1. Initial program 9.4

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

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

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

    if 1.3905296973911986e+296 < (* V l)

    1. Initial program 40.5

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

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

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

      \[\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 add-cube-cbrt24.4

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

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

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

      \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{\frac{\sqrt[3]{A} \cdot \sqrt[3]{A}}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}{V}} \cdot \frac{\sqrt[3]{A}}{\sqrt[3]{\ell}}}\]
    11. Using strategy rm
    12. Applied frac-times28.7

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

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

      \[\leadsto c0 \cdot \frac{\color{blue}{\left|\frac{\sqrt[3]{A}}{\sqrt[3]{\ell}} \cdot {A}^{\frac{1}{6}}\right|}}{\sqrt{V \cdot \sqrt[3]{\ell}}}\]
  3. Recombined 6 regimes into one program.
  4. Final simplification11.9

    \[\leadsto \begin{array}{l} \mathbf{if}\;V \cdot \ell \le -4.0254141507214393 \cdot 10^{99}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{1}{V} \cdot \frac{A}{\ell}}\\ \mathbf{elif}\;V \cdot \ell \le -1.3926274061905453 \cdot 10^{-77}:\\ \;\;\;\;\left(\left|\sqrt[3]{\frac{A}{V \cdot \ell}}\right| \cdot c0\right) \cdot \sqrt{\sqrt[3]{\frac{A}{V \cdot \ell}}}\\ \mathbf{elif}\;V \cdot \ell \le -1.55927 \cdot 10^{-320}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{A}{V} \cdot \frac{1}{\ell}}\\ \mathbf{elif}\;V \cdot \ell \le 1.50349399394837436 \cdot 10^{-304}:\\ \;\;\;\;\frac{c0 \cdot \sqrt{\frac{A}{V}}}{\sqrt{\ell}}\\ \mathbf{elif}\;V \cdot \ell \le 1.3905296973911986 \cdot 10^{296}:\\ \;\;\;\;c0 \cdot \left(\sqrt{A} \cdot \sqrt{\frac{1}{V \cdot \ell}}\right)\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot \frac{\left|\frac{\sqrt[3]{A}}{\sqrt[3]{\ell}} \cdot {A}^{\frac{1}{6}}\right|}{\sqrt{V \cdot \sqrt[3]{\ell}}}\\ \end{array}\]

Reproduce

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