\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}\frac{\frac{1}{\frac{1}{3}}}{\frac{3}{\frac{\frac{a}{\frac{\left(-b\right) - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{c}}}{a}}}double f(double a, double b, double c) {
double r170453 = b;
double r170454 = -r170453;
double r170455 = r170453 * r170453;
double r170456 = 3.0;
double r170457 = a;
double r170458 = r170456 * r170457;
double r170459 = c;
double r170460 = r170458 * r170459;
double r170461 = r170455 - r170460;
double r170462 = sqrt(r170461);
double r170463 = r170454 + r170462;
double r170464 = r170463 / r170458;
return r170464;
}
double f(double a, double b, double c) {
double r170465 = 1.0;
double r170466 = 3.0;
double r170467 = r170465 / r170466;
double r170468 = r170465 / r170467;
double r170469 = a;
double r170470 = b;
double r170471 = -r170470;
double r170472 = r170470 * r170470;
double r170473 = r170466 * r170469;
double r170474 = c;
double r170475 = r170473 * r170474;
double r170476 = r170472 - r170475;
double r170477 = sqrt(r170476);
double r170478 = r170471 - r170477;
double r170479 = r170478 / r170474;
double r170480 = r170469 / r170479;
double r170481 = r170480 / r170469;
double r170482 = r170466 / r170481;
double r170483 = r170468 / r170482;
return r170483;
}



Bits error versus a



Bits error versus b



Bits error versus c
Results
Initial program 28.4
rmApplied flip-+28.4
Simplified0.6
rmApplied *-un-lft-identity0.6
Applied *-un-lft-identity0.6
Applied times-frac0.6
Applied associate-/l*0.6
Simplified0.6
rmApplied associate-/l*0.6
rmApplied *-un-lft-identity0.6
Applied *-un-lft-identity0.6
Applied *-un-lft-identity0.6
Applied times-frac0.6
Applied times-frac0.6
Applied times-frac0.5
Applied *-un-lft-identity0.5
Applied times-frac0.6
Applied associate-/r*0.5
Final simplification0.5
herbie shell --seed 2019323 +o rules:numerics
(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 a) c)))) (* 3 a)))