\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}\frac{a \cdot \frac{c}{\left(-b\right) - \sqrt{\sqrt[3]{{\left(b \cdot b - c \cdot \left(3 \cdot a\right)\right)}^{3}}}}}{a}double code(double a, double b, double c) {
return (((double) (((double) -(b)) + ((double) sqrt(((double) (((double) (b * b)) - ((double) (((double) (3.0 * a)) * c)))))))) / ((double) (3.0 * a)));
}
double code(double a, double b, double c) {
return (((double) (a * (c / ((double) (((double) -(b)) - ((double) sqrt(((double) cbrt(((double) pow(((double) (((double) (b * b)) - ((double) (c * ((double) (3.0 * a)))))), 3.0))))))))))) / a);
}



Bits error versus a



Bits error versus b



Bits error versus c
Results
Initial program 28.7
rmApplied flip-+28.7
Simplified0.6
Simplified0.6
rmApplied associate-/r*0.6
Simplified0.3
rmApplied add-cbrt-cube0.4
Simplified0.4
Final simplification0.4
herbie shell --seed 2020196
(FPCore (a b c)
:name "Cubic critical, narrow range"
:precision binary64
:pre (and (< 1.0536712127723509e-08 a 94906265.62425156) (< 1.0536712127723509e-08 b 94906265.62425156) (< 1.0536712127723509e-08 c 94906265.62425156))
(/ (+ (- b) (sqrt (- (* b b) (* (* 3.0 a) c)))) (* 3.0 a)))