\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}\sqrt{1} \cdot \left(\sqrt{1} \cdot \frac{c}{\left(-b\right) - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}\right)double f(double a, double b, double c) {
double r118682 = b;
double r118683 = -r118682;
double r118684 = r118682 * r118682;
double r118685 = 3.0;
double r118686 = a;
double r118687 = r118685 * r118686;
double r118688 = c;
double r118689 = r118687 * r118688;
double r118690 = r118684 - r118689;
double r118691 = sqrt(r118690);
double r118692 = r118683 + r118691;
double r118693 = r118692 / r118687;
return r118693;
}
double f(double a, double b, double c) {
double r118694 = 1.0;
double r118695 = sqrt(r118694);
double r118696 = c;
double r118697 = b;
double r118698 = -r118697;
double r118699 = r118697 * r118697;
double r118700 = 3.0;
double r118701 = a;
double r118702 = r118700 * r118701;
double r118703 = r118702 * r118696;
double r118704 = r118699 - r118703;
double r118705 = sqrt(r118704);
double r118706 = r118698 - r118705;
double r118707 = r118696 / r118706;
double r118708 = r118695 * r118707;
double r118709 = r118695 * r118708;
return r118709;
}



Bits error versus a



Bits error versus b



Bits error versus c
Results
Initial program 28.7
rmApplied flip-+28.7
Simplified0.6
rmApplied *-un-lft-identity0.6
Applied *-un-lft-identity0.6
Applied times-frac0.6
Applied associate-/l*0.6
Simplified0.5
rmApplied *-un-lft-identity0.5
Applied times-frac0.4
Applied associate-/r*0.4
Simplified0.4
rmApplied *-un-lft-identity0.4
Applied *-un-lft-identity0.4
Applied times-frac0.4
Applied times-frac0.4
Applied times-frac0.4
Applied add-sqr-sqrt0.4
Applied times-frac0.4
Simplified0.4
Simplified0.3
Final simplification0.3
herbie shell --seed 2019351
(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)))