Average Error: 15.3 → 1.1
Time: 3.9s
Precision: 64
\[\sqrt[3]{\frac{g}{2 \cdot a}}\]
\[\frac{1}{\frac{\sqrt[3]{a}}{\sqrt[3]{-1}} \cdot \frac{\sqrt[3]{-2}}{\sqrt[3]{g}}}\]
\sqrt[3]{\frac{g}{2 \cdot a}}
\frac{1}{\frac{\sqrt[3]{a}}{\sqrt[3]{-1}} \cdot \frac{\sqrt[3]{-2}}{\sqrt[3]{g}}}
double code(double g, double a) {
	return cbrt((g / (2.0 * a)));
}
double code(double g, double a) {
	return (1.0 / ((cbrt(a) / cbrt(-1.0)) * (cbrt(-2.0) / cbrt(g))));
}

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

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

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

    \[\leadsto \color{blue}{\frac{\sqrt[3]{-g}}{\sqrt[3]{-2 \cdot a}}}\]
  5. Using strategy rm
  6. Applied clear-num0.8

    \[\leadsto \color{blue}{\frac{1}{\frac{\sqrt[3]{-2 \cdot a}}{\sqrt[3]{-g}}}}\]
  7. Using strategy rm
  8. Applied neg-mul-10.8

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

    \[\leadsto \frac{1}{\frac{\sqrt[3]{-2 \cdot a}}{\color{blue}{\sqrt[3]{-1} \cdot \sqrt[3]{g}}}}\]
  10. Applied *-commutative0.8

    \[\leadsto \frac{1}{\frac{\sqrt[3]{-\color{blue}{a \cdot 2}}}{\sqrt[3]{-1} \cdot \sqrt[3]{g}}}\]
  11. Applied distribute-rgt-neg-in0.8

    \[\leadsto \frac{1}{\frac{\sqrt[3]{\color{blue}{a \cdot \left(-2\right)}}}{\sqrt[3]{-1} \cdot \sqrt[3]{g}}}\]
  12. Applied cbrt-prod1.1

    \[\leadsto \frac{1}{\frac{\color{blue}{\sqrt[3]{a} \cdot \sqrt[3]{-2}}}{\sqrt[3]{-1} \cdot \sqrt[3]{g}}}\]
  13. Applied times-frac1.1

    \[\leadsto \frac{1}{\color{blue}{\frac{\sqrt[3]{a}}{\sqrt[3]{-1}} \cdot \frac{\sqrt[3]{-2}}{\sqrt[3]{g}}}}\]
  14. Final simplification1.1

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

Reproduce

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