\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}\frac{\frac{c}{1}}{\left(-b\right) - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}double f(double a, double b, double c) {
double r88064 = b;
double r88065 = -r88064;
double r88066 = r88064 * r88064;
double r88067 = 3.0;
double r88068 = a;
double r88069 = r88067 * r88068;
double r88070 = c;
double r88071 = r88069 * r88070;
double r88072 = r88066 - r88071;
double r88073 = sqrt(r88072);
double r88074 = r88065 + r88073;
double r88075 = r88074 / r88069;
return r88075;
}
double f(double a, double b, double c) {
double r88076 = c;
double r88077 = 1.0;
double r88078 = r88076 / r88077;
double r88079 = b;
double r88080 = -r88079;
double r88081 = r88079 * r88079;
double r88082 = 3.0;
double r88083 = a;
double r88084 = r88082 * r88083;
double r88085 = r88084 * r88076;
double r88086 = r88081 - r88085;
double r88087 = sqrt(r88086);
double r88088 = r88080 - r88087;
double r88089 = r88078 / r88088;
return r88089;
}



Bits error versus a



Bits error versus b



Bits error versus c
Results
Initial program 52.3
rmApplied flip-+52.3
Simplified0.5
rmApplied *-un-lft-identity0.5
Applied *-un-lft-identity0.5
Applied times-frac0.5
Applied times-frac0.6
Simplified0.6
Simplified0.6
rmApplied associate-*r/0.5
Simplified0.2
rmApplied *-un-lft-identity0.2
Applied associate-/r*0.2
Simplified0.1
Final simplification0.1
herbie shell --seed 2020060
(FPCore (a b c)
:name "Cubic critical, wide range"
:precision binary64
:pre (and (< 4.9303800000000003e-32 a 2.02824e+31) (< 4.9303800000000003e-32 b 2.02824e+31) (< 4.9303800000000003e-32 c 2.02824e+31))
(/ (+ (- b) (sqrt (- (* b b) (* (* 3 a) c)))) (* 3 a)))