Average Error: 15.4 → 0.9
Time: 15.0s
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 r229815 = g;
        double r229816 = 2.0;
        double r229817 = a;
        double r229818 = r229816 * r229817;
        double r229819 = r229815 / r229818;
        double r229820 = cbrt(r229819);
        return r229820;
}

double f(double g, double a) {
        double r229821 = g;
        double r229822 = cbrt(r229821);
        double r229823 = 1.0;
        double r229824 = 2.0;
        double r229825 = a;
        double r229826 = r229824 * r229825;
        double r229827 = cbrt(r229826);
        double r229828 = r229823 / r229827;
        double r229829 = r229822 * r229828;
        return r229829;
}

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

    \[\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 2020045 +o rules:numerics
(FPCore (g a)
  :name "2-ancestry mixing, zero discriminant"
  :precision binary64
  (cbrt (/ g (* 2 a))))