Average Error: 15.1 → 0.9
Time: 17.4s
Precision: 64
\[\sqrt[3]{\frac{g}{2 \cdot a}}\]
\[\sqrt[3]{g} \cdot \frac{1}{\sqrt[3]{2 \cdot a}}\]
\sqrt[3]{\frac{g}{2 \cdot a}}
\sqrt[3]{g} \cdot \frac{1}{\sqrt[3]{2 \cdot a}}
double f(double g, double a) {
        double r5024546 = g;
        double r5024547 = 2.0;
        double r5024548 = a;
        double r5024549 = r5024547 * r5024548;
        double r5024550 = r5024546 / r5024549;
        double r5024551 = cbrt(r5024550);
        return r5024551;
}

double f(double g, double a) {
        double r5024552 = g;
        double r5024553 = cbrt(r5024552);
        double r5024554 = 1.0;
        double r5024555 = 2.0;
        double r5024556 = a;
        double r5024557 = r5024555 * r5024556;
        double r5024558 = cbrt(r5024557);
        double r5024559 = r5024554 / r5024558;
        double r5024560 = r5024553 * r5024559;
        return r5024560;
}

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.1

    \[\sqrt[3]{\frac{g}{2 \cdot a}}\]
  2. Using strategy rm
  3. Applied cbrt-div0.9

    \[\leadsto \color{blue}{\frac{\sqrt[3]{g}}{\sqrt[3]{2 \cdot a}}}\]
  4. Using strategy rm
  5. Applied div-inv0.9

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

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

Reproduce

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