Average Error: 18.4 → 13.0
Time: 34.2s
Precision: 64
\[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\]
\[\begin{array}{l} \mathbf{if}\;V \cdot \ell \le -7.734733427175185 \cdot 10^{-69}:\\ \;\;\;\;\sqrt{\sqrt[3]{A} \cdot \left(\frac{\sqrt[3]{A}}{\ell} \cdot \frac{\sqrt[3]{A}}{V}\right)} \cdot c0\\ \mathbf{elif}\;V \cdot \ell \le 9.4723320203592 \cdot 10^{-311}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{A}{\ell} \cdot \frac{1}{V}}\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot \left(\sqrt{\frac{1}{V \cdot \ell}} \cdot \sqrt{A}\right)\\ \end{array}\]
c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}
\begin{array}{l}
\mathbf{if}\;V \cdot \ell \le -7.734733427175185 \cdot 10^{-69}:\\
\;\;\;\;\sqrt{\sqrt[3]{A} \cdot \left(\frac{\sqrt[3]{A}}{\ell} \cdot \frac{\sqrt[3]{A}}{V}\right)} \cdot c0\\

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

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

\end{array}
double f(double c0, double A, double V, double l) {
        double r18939889 = c0;
        double r18939890 = A;
        double r18939891 = V;
        double r18939892 = l;
        double r18939893 = r18939891 * r18939892;
        double r18939894 = r18939890 / r18939893;
        double r18939895 = sqrt(r18939894);
        double r18939896 = r18939889 * r18939895;
        return r18939896;
}

double f(double c0, double A, double V, double l) {
        double r18939897 = V;
        double r18939898 = l;
        double r18939899 = r18939897 * r18939898;
        double r18939900 = -7.734733427175185e-69;
        bool r18939901 = r18939899 <= r18939900;
        double r18939902 = A;
        double r18939903 = cbrt(r18939902);
        double r18939904 = r18939903 / r18939898;
        double r18939905 = r18939903 / r18939897;
        double r18939906 = r18939904 * r18939905;
        double r18939907 = r18939903 * r18939906;
        double r18939908 = sqrt(r18939907);
        double r18939909 = c0;
        double r18939910 = r18939908 * r18939909;
        double r18939911 = 9.4723320203592e-311;
        bool r18939912 = r18939899 <= r18939911;
        double r18939913 = r18939902 / r18939898;
        double r18939914 = 1.0;
        double r18939915 = r18939914 / r18939897;
        double r18939916 = r18939913 * r18939915;
        double r18939917 = sqrt(r18939916);
        double r18939918 = r18939909 * r18939917;
        double r18939919 = r18939914 / r18939899;
        double r18939920 = sqrt(r18939919);
        double r18939921 = sqrt(r18939902);
        double r18939922 = r18939920 * r18939921;
        double r18939923 = r18939909 * r18939922;
        double r18939924 = r18939912 ? r18939918 : r18939923;
        double r18939925 = r18939901 ? r18939910 : r18939924;
        return r18939925;
}

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) < -7.734733427175185e-69

    1. Initial program 14.8

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

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

      \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{\sqrt[3]{A} \cdot \sqrt[3]{A}}{V} \cdot \frac{\sqrt[3]{A}}{\ell}}}\]
    5. Using strategy rm
    6. Applied *-un-lft-identity15.1

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

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

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

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

    if -7.734733427175185e-69 < (* V l) < 9.4723320203592e-311

    1. Initial program 32.8

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

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

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

    if 9.4723320203592e-311 < (* V l)

    1. Initial program 14.2

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

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

      \[\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 simplification13.0

    \[\leadsto \begin{array}{l} \mathbf{if}\;V \cdot \ell \le -7.734733427175185 \cdot 10^{-69}:\\ \;\;\;\;\sqrt{\sqrt[3]{A} \cdot \left(\frac{\sqrt[3]{A}}{\ell} \cdot \frac{\sqrt[3]{A}}{V}\right)} \cdot c0\\ \mathbf{elif}\;V \cdot \ell \le 9.4723320203592 \cdot 10^{-311}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{A}{\ell} \cdot \frac{1}{V}}\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot \left(\sqrt{\frac{1}{V \cdot \ell}} \cdot \sqrt{A}\right)\\ \end{array}\]

Reproduce

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