Average Error: 18.7 → 12.3
Time: 23.9s
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 r10576706 = c0;
        double r10576707 = A;
        double r10576708 = V;
        double r10576709 = l;
        double r10576710 = r10576708 * r10576709;
        double r10576711 = r10576707 / r10576710;
        double r10576712 = sqrt(r10576711);
        double r10576713 = r10576706 * r10576712;
        return r10576713;
}

double f(double c0, double A, double V, double l) {
        double r10576714 = V;
        double r10576715 = l;
        double r10576716 = r10576714 * r10576715;
        double r10576717 = -6.85071675707524e+298;
        bool r10576718 = r10576716 <= r10576717;
        double r10576719 = c0;
        double r10576720 = A;
        double r10576721 = cbrt(r10576720);
        double r10576722 = r10576721 * r10576721;
        double r10576723 = r10576722 / r10576714;
        double r10576724 = sqrt(r10576723);
        double r10576725 = r10576719 * r10576724;
        double r10576726 = r10576721 / r10576715;
        double r10576727 = sqrt(r10576726);
        double r10576728 = r10576725 * r10576727;
        double r10576729 = -1.4865194574582166e-308;
        bool r10576730 = r10576716 <= r10576729;
        double r10576731 = 1.0;
        double r10576732 = r10576716 / r10576720;
        double r10576733 = r10576731 / r10576732;
        double r10576734 = sqrt(r10576733);
        double r10576735 = r10576719 * r10576734;
        double r10576736 = 6.038338028565449e-304;
        bool r10576737 = r10576716 <= r10576736;
        double r10576738 = r10576720 / r10576715;
        double r10576739 = sqrt(r10576738);
        double r10576740 = r10576739 * r10576719;
        double r10576741 = sqrt(r10576714);
        double r10576742 = r10576740 / r10576741;
        double r10576743 = 7.324432061917295e+292;
        bool r10576744 = r10576716 <= r10576743;
        double r10576745 = sqrt(r10576720);
        double r10576746 = sqrt(r10576716);
        double r10576747 = r10576745 / r10576746;
        double r10576748 = r10576747 * r10576719;
        double r10576749 = r10576731 / r10576714;
        double r10576750 = r10576738 * r10576749;
        double r10576751 = sqrt(r10576750);
        double r10576752 = r10576719 * r10576751;
        double r10576753 = r10576744 ? r10576748 : r10576752;
        double r10576754 = r10576737 ? r10576742 : r10576753;
        double r10576755 = r10576730 ? r10576735 : r10576754;
        double r10576756 = r10576718 ? r10576728 : r10576755;
        return r10576756;
}

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 
(FPCore (c0 A V l)
  :name "Henrywood and Agarwal, Equation (3)"
  (* c0 (sqrt (/ A (* V l)))))