Average Error: 18.4 → 13.0
Time: 33.5s
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 r23543737 = c0;
        double r23543738 = A;
        double r23543739 = V;
        double r23543740 = l;
        double r23543741 = r23543739 * r23543740;
        double r23543742 = r23543738 / r23543741;
        double r23543743 = sqrt(r23543742);
        double r23543744 = r23543737 * r23543743;
        return r23543744;
}

double f(double c0, double A, double V, double l) {
        double r23543745 = V;
        double r23543746 = l;
        double r23543747 = r23543745 * r23543746;
        double r23543748 = -7.734733427175185e-69;
        bool r23543749 = r23543747 <= r23543748;
        double r23543750 = A;
        double r23543751 = cbrt(r23543750);
        double r23543752 = r23543751 / r23543746;
        double r23543753 = r23543751 / r23543745;
        double r23543754 = r23543752 * r23543753;
        double r23543755 = r23543751 * r23543754;
        double r23543756 = sqrt(r23543755);
        double r23543757 = c0;
        double r23543758 = r23543756 * r23543757;
        double r23543759 = 9.4723320203592e-311;
        bool r23543760 = r23543747 <= r23543759;
        double r23543761 = r23543750 / r23543746;
        double r23543762 = 1.0;
        double r23543763 = r23543762 / r23543745;
        double r23543764 = r23543761 * r23543763;
        double r23543765 = sqrt(r23543764);
        double r23543766 = r23543757 * r23543765;
        double r23543767 = r23543762 / r23543747;
        double r23543768 = sqrt(r23543767);
        double r23543769 = sqrt(r23543750);
        double r23543770 = r23543768 * r23543769;
        double r23543771 = r23543757 * r23543770;
        double r23543772 = r23543760 ? r23543766 : r23543771;
        double r23543773 = r23543749 ? r23543758 : r23543772;
        return r23543773;
}

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