Average Error: 18.7 → 12.3
Time: 25.2s
Precision: 64
\[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\]
\[\begin{array}{l} \mathbf{if}\;V \cdot \ell \le -6.85071675707524 \cdot 10^{+298}:\\ \;\;\;\;\left(c0 \cdot \sqrt{\frac{\sqrt[3]{A} \cdot \sqrt[3]{A}}{V}}\right) \cdot \sqrt{\frac{\sqrt[3]{A}}{\ell}}\\ \mathbf{elif}\;V \cdot \ell \le -1.4865194574582166 \cdot 10^{-308}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{1}{\frac{V \cdot \ell}{A}}}\\ \mathbf{elif}\;V \cdot \ell \le 6.038338028565449 \cdot 10^{-304}:\\ \;\;\;\;\frac{\sqrt{\frac{A}{\ell}} \cdot c0}{\sqrt{V}}\\ \mathbf{elif}\;V \cdot \ell \le 7.324432061917295 \cdot 10^{+292}:\\ \;\;\;\;\frac{\sqrt{A}}{\sqrt{V \cdot \ell}} \cdot c0\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{A}{\ell} \cdot \frac{1}{V}}\\ \end{array}\]
c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}
\begin{array}{l}
\mathbf{if}\;V \cdot \ell \le -6.85071675707524 \cdot 10^{+298}:\\
\;\;\;\;\left(c0 \cdot \sqrt{\frac{\sqrt[3]{A} \cdot \sqrt[3]{A}}{V}}\right) \cdot \sqrt{\frac{\sqrt[3]{A}}{\ell}}\\

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

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

\mathbf{elif}\;V \cdot \ell \le 7.324432061917295 \cdot 10^{+292}:\\
\;\;\;\;\frac{\sqrt{A}}{\sqrt{V \cdot \ell}} \cdot c0\\

\mathbf{else}:\\
\;\;\;\;c0 \cdot \sqrt{\frac{A}{\ell} \cdot \frac{1}{V}}\\

\end{array}
double f(double c0, double A, double V, double l) {
        double r33146891 = c0;
        double r33146892 = A;
        double r33146893 = V;
        double r33146894 = l;
        double r33146895 = r33146893 * r33146894;
        double r33146896 = r33146892 / r33146895;
        double r33146897 = sqrt(r33146896);
        double r33146898 = r33146891 * r33146897;
        return r33146898;
}

double f(double c0, double A, double V, double l) {
        double r33146899 = V;
        double r33146900 = l;
        double r33146901 = r33146899 * r33146900;
        double r33146902 = -6.85071675707524e+298;
        bool r33146903 = r33146901 <= r33146902;
        double r33146904 = c0;
        double r33146905 = A;
        double r33146906 = cbrt(r33146905);
        double r33146907 = r33146906 * r33146906;
        double r33146908 = r33146907 / r33146899;
        double r33146909 = sqrt(r33146908);
        double r33146910 = r33146904 * r33146909;
        double r33146911 = r33146906 / r33146900;
        double r33146912 = sqrt(r33146911);
        double r33146913 = r33146910 * r33146912;
        double r33146914 = -1.4865194574582166e-308;
        bool r33146915 = r33146901 <= r33146914;
        double r33146916 = 1.0;
        double r33146917 = r33146901 / r33146905;
        double r33146918 = r33146916 / r33146917;
        double r33146919 = sqrt(r33146918);
        double r33146920 = r33146904 * r33146919;
        double r33146921 = 6.038338028565449e-304;
        bool r33146922 = r33146901 <= r33146921;
        double r33146923 = r33146905 / r33146900;
        double r33146924 = sqrt(r33146923);
        double r33146925 = r33146924 * r33146904;
        double r33146926 = sqrt(r33146899);
        double r33146927 = r33146925 / r33146926;
        double r33146928 = 7.324432061917295e+292;
        bool r33146929 = r33146901 <= r33146928;
        double r33146930 = sqrt(r33146905);
        double r33146931 = sqrt(r33146901);
        double r33146932 = r33146930 / r33146931;
        double r33146933 = r33146932 * r33146904;
        double r33146934 = r33146916 / r33146899;
        double r33146935 = r33146923 * r33146934;
        double r33146936 = sqrt(r33146935);
        double r33146937 = r33146904 * r33146936;
        double r33146938 = r33146929 ? r33146933 : r33146937;
        double r33146939 = r33146922 ? r33146927 : r33146938;
        double r33146940 = r33146915 ? r33146920 : r33146939;
        double r33146941 = r33146903 ? r33146913 : r33146940;
        return r33146941;
}

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 5 regimes
  2. if (* V l) < -6.85071675707524e+298

    1. Initial program 40.2

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

      \[\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-frac24.8

      \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{\sqrt[3]{A} \cdot \sqrt[3]{A}}{V} \cdot \frac{\sqrt[3]{A}}{\ell}}}\]
    5. Applied sqrt-prod36.5

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

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

    if -6.85071675707524e+298 < (* V l) < -1.4865194574582166e-308

    1. Initial program 10.0

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

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

    if -1.4865194574582166e-308 < (* V l) < 6.038338028565449e-304

    1. Initial program 57.4

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

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

      \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1}{V} \cdot \frac{A}{\ell}}}\]
    5. Using strategy rm
    6. Applied associate-*l/35.1

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

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

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

    if 6.038338028565449e-304 < (* V l) < 7.324432061917295e+292

    1. Initial program 9.1

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

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

      \[\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 frac-times9.6

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

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

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

    if 7.324432061917295e+292 < (* V l)

    1. Initial program 40.6

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;V \cdot \ell \le -6.85071675707524 \cdot 10^{+298}:\\ \;\;\;\;\left(c0 \cdot \sqrt{\frac{\sqrt[3]{A} \cdot \sqrt[3]{A}}{V}}\right) \cdot \sqrt{\frac{\sqrt[3]{A}}{\ell}}\\ \mathbf{elif}\;V \cdot \ell \le -1.4865194574582166 \cdot 10^{-308}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{1}{\frac{V \cdot \ell}{A}}}\\ \mathbf{elif}\;V \cdot \ell \le 6.038338028565449 \cdot 10^{-304}:\\ \;\;\;\;\frac{\sqrt{\frac{A}{\ell}} \cdot c0}{\sqrt{V}}\\ \mathbf{elif}\;V \cdot \ell \le 7.324432061917295 \cdot 10^{+292}:\\ \;\;\;\;\frac{\sqrt{A}}{\sqrt{V \cdot \ell}} \cdot c0\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{A}{\ell} \cdot \frac{1}{V}}\\ \end{array}\]

Reproduce

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