\sqrt[3]{\frac{g}{2 \cdot a}}\frac{\sqrt[3]{-g}}{\sqrt[3]{-2 \cdot a}}double code(double g, double a) {
return cbrt((g / (2.0 * a)));
}
double code(double g, double a) {
return (cbrt(-g) / cbrt(-(2.0 * a)));
}



Bits error versus g



Bits error versus a
Results
Initial program 15.6
rmApplied frac-2neg15.6
Applied cbrt-div0.9
Final simplification0.9
herbie shell --seed 2020071
(FPCore (g a)
:name "2-ancestry mixing, zero discriminant"
:precision binary64
(cbrt (/ g (* 2 a))))