Average Error: 15.6 → 0.9
Time: 4.9s
Precision: 64
\[\sqrt[3]{\frac{g}{2 \cdot a}}\]
\[\frac{\frac{\sqrt[3]{g}}{{2}^{\frac{1}{3}}}}{\sqrt[3]{a}}\]
\sqrt[3]{\frac{g}{2 \cdot a}}
\frac{\frac{\sqrt[3]{g}}{{2}^{\frac{1}{3}}}}{\sqrt[3]{a}}
double code(double g, double a) {
	return cbrt((g / (2.0 * a)));
}
double code(double g, double a) {
	return ((cbrt(g) / pow(2.0, 0.3333333333333333)) / cbrt(a));
}

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

    \[\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 cbrt-prod1.1

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

    \[\leadsto \color{blue}{\frac{\frac{\sqrt[3]{g}}{\sqrt[3]{2}}}{\sqrt[3]{a}}}\]
  7. Using strategy rm
  8. Applied pow1/30.9

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

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

Reproduce

herbie shell --seed 2020100 
(FPCore (g a)
  :name "2-ancestry mixing, zero discriminant"
  :precision binary64
  (cbrt (/ g (* 2 a))))