Average Error: 15.8 → 0.8
Time: 20.2s
Precision: 64
\[\sqrt[3]{\frac{g}{2 \cdot a}}\]
\[\frac{1}{\frac{\sqrt[3]{2 \cdot a}}{\sqrt[3]{g}}}\]
\sqrt[3]{\frac{g}{2 \cdot a}}
\frac{1}{\frac{\sqrt[3]{2 \cdot a}}{\sqrt[3]{g}}}
double f(double g, double a) {
        double r107317 = g;
        double r107318 = 2.0;
        double r107319 = a;
        double r107320 = r107318 * r107319;
        double r107321 = r107317 / r107320;
        double r107322 = cbrt(r107321);
        return r107322;
}

double f(double g, double a) {
        double r107323 = 1.0;
        double r107324 = 2.0;
        double r107325 = a;
        double r107326 = r107324 * r107325;
        double r107327 = cbrt(r107326);
        double r107328 = g;
        double r107329 = cbrt(r107328);
        double r107330 = r107327 / r107329;
        double r107331 = r107323 / r107330;
        return r107331;
}

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

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

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

    \[\leadsto \color{blue}{\sqrt[3]{g} \cdot \sqrt[3]{\frac{1}{2 \cdot a}}}\]
  5. Using strategy rm
  6. Applied *-un-lft-identity0.8

    \[\leadsto \color{blue}{\left(1 \cdot \sqrt[3]{g}\right)} \cdot \sqrt[3]{\frac{1}{2 \cdot a}}\]
  7. Applied associate-*l*0.8

    \[\leadsto \color{blue}{1 \cdot \left(\sqrt[3]{g} \cdot \sqrt[3]{\frac{1}{2 \cdot a}}\right)}\]
  8. Simplified0.8

    \[\leadsto 1 \cdot \color{blue}{\left(\sqrt[3]{\frac{1}{2 \cdot a}} \cdot \sqrt[3]{g}\right)}\]
  9. Using strategy rm
  10. Applied cbrt-div0.8

    \[\leadsto 1 \cdot \left(\color{blue}{\frac{\sqrt[3]{1}}{\sqrt[3]{2 \cdot a}}} \cdot \sqrt[3]{g}\right)\]
  11. Applied associate-*l/0.8

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

    \[\leadsto 1 \cdot \frac{\color{blue}{\sqrt[3]{g}}}{\sqrt[3]{2 \cdot a}}\]
  13. Using strategy rm
  14. Applied *-un-lft-identity0.8

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

    \[\leadsto 1 \cdot \frac{\color{blue}{\sqrt[3]{1} \cdot \sqrt[3]{g}}}{\sqrt[3]{2 \cdot a}}\]
  16. Applied associate-/l*0.8

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

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

Reproduce

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