\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}\frac{c}{\left(-b\right) - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}double f(double a, double b, double c) {
double r70291 = b;
double r70292 = -r70291;
double r70293 = r70291 * r70291;
double r70294 = 3.0;
double r70295 = a;
double r70296 = r70294 * r70295;
double r70297 = c;
double r70298 = r70296 * r70297;
double r70299 = r70293 - r70298;
double r70300 = sqrt(r70299);
double r70301 = r70292 + r70300;
double r70302 = r70301 / r70296;
return r70302;
}
double f(double a, double b, double c) {
double r70303 = c;
double r70304 = b;
double r70305 = -r70304;
double r70306 = r70304 * r70304;
double r70307 = 3.0;
double r70308 = a;
double r70309 = r70307 * r70308;
double r70310 = r70309 * r70303;
double r70311 = r70306 - r70310;
double r70312 = sqrt(r70311);
double r70313 = r70305 - r70312;
double r70314 = r70303 / r70313;
return r70314;
}



Bits error versus a



Bits error versus b



Bits error versus c
Results
Initial program 43.4
rmApplied flip-+43.4
Simplified0.5
rmApplied clear-num0.6
Simplified0.5
rmApplied *-un-lft-identity0.5
Applied *-un-lft-identity0.5
Applied times-frac0.5
Applied associate-/l*0.5
Simplified0.3
rmApplied add-cube-cbrt0.3
Applied times-frac0.3
Simplified0.3
Simplified0.2
Final simplification0.2
herbie shell --seed 2019347 +o rules:numerics
(FPCore (a b c)
:name "Cubic critical, medium range"
:precision binary64
:pre (and (< 1.11022e-16 a 9.0072e+15) (< 1.11022e-16 b 9.0072e+15) (< 1.11022e-16 c 9.0072e+15))
(/ (+ (- b) (sqrt (- (* b b) (* (* 3 a) c)))) (* 3 a)))