Average Error: 15.7 → 0.9
Time: 12.8s
Precision: 64
\[\sqrt[3]{\frac{g}{2 \cdot a}}\]
\[\frac{\sqrt[3]{g}}{\sqrt[3]{a \cdot 2}}\]
\sqrt[3]{\frac{g}{2 \cdot a}}
\frac{\sqrt[3]{g}}{\sqrt[3]{a \cdot 2}}
double f(double g, double a) {
        double r102050 = g;
        double r102051 = 2.0;
        double r102052 = a;
        double r102053 = r102051 * r102052;
        double r102054 = r102050 / r102053;
        double r102055 = cbrt(r102054);
        return r102055;
}

double f(double g, double a) {
        double r102056 = g;
        double r102057 = cbrt(r102056);
        double r102058 = a;
        double r102059 = 2.0;
        double r102060 = r102058 * r102059;
        double r102061 = cbrt(r102060);
        double r102062 = r102057 / r102061;
        return r102062;
}

Error

Bits error versus g

Bits error versus a

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 15.7

    \[\sqrt[3]{\frac{g}{2 \cdot a}}\]
  2. Using strategy rm
  3. Applied div-inv15.7

    \[\leadsto \sqrt[3]{\color{blue}{g \cdot \frac{1}{2 \cdot a}}}\]
  4. Applied cbrt-prod0.9

    \[\leadsto \color{blue}{\sqrt[3]{g} \cdot \sqrt[3]{\frac{1}{2 \cdot a}}}\]
  5. Simplified0.9

    \[\leadsto \sqrt[3]{g} \cdot \color{blue}{\sqrt[3]{\frac{1}{a \cdot 2}}}\]
  6. Using strategy rm
  7. Applied cbrt-div0.9

    \[\leadsto \sqrt[3]{g} \cdot \color{blue}{\frac{\sqrt[3]{1}}{\sqrt[3]{a \cdot 2}}}\]
  8. Applied associate-*r/0.9

    \[\leadsto \color{blue}{\frac{\sqrt[3]{g} \cdot \sqrt[3]{1}}{\sqrt[3]{a \cdot 2}}}\]
  9. Simplified0.9

    \[\leadsto \frac{\color{blue}{\sqrt[3]{g}}}{\sqrt[3]{a \cdot 2}}\]
  10. Final simplification0.9

    \[\leadsto \frac{\sqrt[3]{g}}{\sqrt[3]{a \cdot 2}}\]

Reproduce

herbie shell --seed 2019179 +o rules:numerics
(FPCore (g a)
  :name "2-ancestry mixing, zero discriminant"
  (cbrt (/ g (* 2.0 a))))