Average Error: 19.4 → 12.2
Time: 5.6s
Precision: 64
\[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\]
\[\begin{array}{l} \mathbf{if}\;V \cdot \ell \le 2.96439387504747926505941275720932823419 \cdot 10^{-323}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{\frac{\sqrt[3]{A} \cdot \sqrt[3]{A}}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}{V} \cdot \frac{\sqrt[3]{A}}{\sqrt[3]{\ell}}}\\ \mathbf{elif}\;V \cdot \ell \le 1.666028060170161707591813005969240947671 \cdot 10^{121}:\\ \;\;\;\;\frac{c0 \cdot \sqrt{A}}{\sqrt{V \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot \frac{\sqrt{\frac{\sqrt[3]{A} \cdot \sqrt[3]{A}}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}} \cdot \sqrt[3]{A}}}{\sqrt{V \cdot \sqrt[3]{\ell}}}\\ \end{array}\]
c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}
\begin{array}{l}
\mathbf{if}\;V \cdot \ell \le 2.96439387504747926505941275720932823419 \cdot 10^{-323}:\\
\;\;\;\;c0 \cdot \sqrt{\frac{\frac{\sqrt[3]{A} \cdot \sqrt[3]{A}}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}{V} \cdot \frac{\sqrt[3]{A}}{\sqrt[3]{\ell}}}\\

\mathbf{elif}\;V \cdot \ell \le 1.666028060170161707591813005969240947671 \cdot 10^{121}:\\
\;\;\;\;\frac{c0 \cdot \sqrt{A}}{\sqrt{V \cdot \ell}}\\

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

\end{array}
double f(double c0, double A, double V, double l) {
        double r167644 = c0;
        double r167645 = A;
        double r167646 = V;
        double r167647 = l;
        double r167648 = r167646 * r167647;
        double r167649 = r167645 / r167648;
        double r167650 = sqrt(r167649);
        double r167651 = r167644 * r167650;
        return r167651;
}

double f(double c0, double A, double V, double l) {
        double r167652 = V;
        double r167653 = l;
        double r167654 = r167652 * r167653;
        double r167655 = 2.9643938750475e-323;
        bool r167656 = r167654 <= r167655;
        double r167657 = c0;
        double r167658 = A;
        double r167659 = cbrt(r167658);
        double r167660 = r167659 * r167659;
        double r167661 = cbrt(r167653);
        double r167662 = r167661 * r167661;
        double r167663 = r167660 / r167662;
        double r167664 = r167663 / r167652;
        double r167665 = r167659 / r167661;
        double r167666 = r167664 * r167665;
        double r167667 = sqrt(r167666);
        double r167668 = r167657 * r167667;
        double r167669 = 1.6660280601701617e+121;
        bool r167670 = r167654 <= r167669;
        double r167671 = sqrt(r167658);
        double r167672 = r167657 * r167671;
        double r167673 = sqrt(r167654);
        double r167674 = r167672 / r167673;
        double r167675 = r167663 * r167659;
        double r167676 = sqrt(r167675);
        double r167677 = r167652 * r167661;
        double r167678 = sqrt(r167677);
        double r167679 = r167676 / r167678;
        double r167680 = r167657 * r167679;
        double r167681 = r167670 ? r167674 : r167680;
        double r167682 = r167656 ? r167668 : r167681;
        return r167682;
}

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) < 2.9643938750475e-323

    1. Initial program 23.8

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

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

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

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

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

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

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

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

    if 2.9643938750475e-323 < (* V l) < 1.6660280601701617e+121

    1. Initial program 9.0

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

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

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

    if 1.6660280601701617e+121 < (* V l)

    1. Initial program 23.2

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;V \cdot \ell \le 2.96439387504747926505941275720932823419 \cdot 10^{-323}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{\frac{\sqrt[3]{A} \cdot \sqrt[3]{A}}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}{V} \cdot \frac{\sqrt[3]{A}}{\sqrt[3]{\ell}}}\\ \mathbf{elif}\;V \cdot \ell \le 1.666028060170161707591813005969240947671 \cdot 10^{121}:\\ \;\;\;\;\frac{c0 \cdot \sqrt{A}}{\sqrt{V \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot \frac{\sqrt{\frac{\sqrt[3]{A} \cdot \sqrt[3]{A}}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}} \cdot \sqrt[3]{A}}}{\sqrt{V \cdot \sqrt[3]{\ell}}}\\ \end{array}\]

Reproduce

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