Average Error: 19.2 → 8.2
Time: 6.1s
Precision: binary64
\[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\]
\[\begin{array}{l} \mathbf{if}\;V \cdot \ell \le -8.09482718120121354 \cdot 10^{285}:\\ \;\;\;\;\frac{\sqrt{\frac{\frac{A}{\ell}}{\sqrt[3]{V}}} \cdot c0}{\sqrt{\sqrt[3]{V} \cdot \sqrt[3]{V}}}\\ \mathbf{elif}\;V \cdot \ell \le -1.12706625813495087 \cdot 10^{-162}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\\ \mathbf{elif}\;V \cdot \ell \le -0.0:\\ \;\;\;\;c0 \cdot \left(\sqrt{\frac{1}{\sqrt[3]{V} \cdot \sqrt[3]{V}}} \cdot \sqrt{\frac{\frac{A}{\ell}}{\sqrt[3]{V}}}\right)\\ \mathbf{elif}\;V \cdot \ell \le 1.9169168385554814 \cdot 10^{260}:\\ \;\;\;\;c0 \cdot \left(\sqrt{A} \cdot \sqrt{\frac{1}{V \cdot \ell}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{\frac{\frac{A}{\ell}}{\sqrt[3]{V}}} \cdot c0}{\sqrt{\sqrt[3]{V} \cdot \sqrt[3]{V}}}\\ \end{array}\]
c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}
\begin{array}{l}
\mathbf{if}\;V \cdot \ell \le -8.09482718120121354 \cdot 10^{285}:\\
\;\;\;\;\frac{\sqrt{\frac{\frac{A}{\ell}}{\sqrt[3]{V}}} \cdot c0}{\sqrt{\sqrt[3]{V} \cdot \sqrt[3]{V}}}\\

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

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

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

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

\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)) <= -8.094827181201214e+285)) {
		VAR = ((double) (((double) (((double) sqrt(((double) (((double) (A / l)) / ((double) cbrt(V)))))) * c0)) / ((double) sqrt(((double) (((double) cbrt(V)) * ((double) cbrt(V))))))));
	} else {
		double VAR_1;
		if ((((double) (V * l)) <= -1.1270662581349509e-162)) {
			VAR_1 = ((double) (c0 * ((double) sqrt(((double) (A / ((double) (V * l))))))));
		} else {
			double VAR_2;
			if ((((double) (V * l)) <= -0.0)) {
				VAR_2 = ((double) (c0 * ((double) (((double) sqrt(((double) (1.0 / ((double) (((double) cbrt(V)) * ((double) cbrt(V)))))))) * ((double) sqrt(((double) (((double) (A / l)) / ((double) cbrt(V))))))))));
			} else {
				double VAR_3;
				if ((((double) (V * l)) <= 1.9169168385554814e+260)) {
					VAR_3 = ((double) (c0 * ((double) (((double) sqrt(A)) * ((double) sqrt(((double) (1.0 / ((double) (V * l))))))))));
				} else {
					VAR_3 = ((double) (((double) (((double) sqrt(((double) (((double) (A / l)) / ((double) cbrt(V)))))) * c0)) / ((double) sqrt(((double) (((double) cbrt(V)) * ((double) cbrt(V))))))));
				}
				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 4 regimes
  2. if (* V l) < -8.09482718120121354e285 or 1.9169168385554814e260 < (* V l)

    1. Initial program 36.1

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.09482718120121354e285 < (* V l) < -1.12706625813495087e-162

    1. Initial program 7.6

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

    if -1.12706625813495087e-162 < (* V l) < -0.0

    1. Initial program 44.9

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

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

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

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

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

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

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

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

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

    if -0.0 < (* V l) < 1.9169168385554814e260

    1. Initial program 9.4

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;V \cdot \ell \le -8.09482718120121354 \cdot 10^{285}:\\ \;\;\;\;\frac{\sqrt{\frac{\frac{A}{\ell}}{\sqrt[3]{V}}} \cdot c0}{\sqrt{\sqrt[3]{V} \cdot \sqrt[3]{V}}}\\ \mathbf{elif}\;V \cdot \ell \le -1.12706625813495087 \cdot 10^{-162}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\\ \mathbf{elif}\;V \cdot \ell \le -0.0:\\ \;\;\;\;c0 \cdot \left(\sqrt{\frac{1}{\sqrt[3]{V} \cdot \sqrt[3]{V}}} \cdot \sqrt{\frac{\frac{A}{\ell}}{\sqrt[3]{V}}}\right)\\ \mathbf{elif}\;V \cdot \ell \le 1.9169168385554814 \cdot 10^{260}:\\ \;\;\;\;c0 \cdot \left(\sqrt{A} \cdot \sqrt{\frac{1}{V \cdot \ell}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{\frac{\frac{A}{\ell}}{\sqrt[3]{V}}} \cdot c0}{\sqrt{\sqrt[3]{V} \cdot \sqrt[3]{V}}}\\ \end{array}\]

Reproduce

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