\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 c\right) \cdot a}}double f(double a, double b, double c) {
double r95218 = b;
double r95219 = -r95218;
double r95220 = r95218 * r95218;
double r95221 = 3.0;
double r95222 = a;
double r95223 = r95221 * r95222;
double r95224 = c;
double r95225 = r95223 * r95224;
double r95226 = r95220 - r95225;
double r95227 = sqrt(r95226);
double r95228 = r95219 + r95227;
double r95229 = r95228 / r95223;
return r95229;
}
double f(double a, double b, double c) {
double r95230 = c;
double r95231 = b;
double r95232 = -r95231;
double r95233 = r95231 * r95231;
double r95234 = 3.0;
double r95235 = r95234 * r95230;
double r95236 = a;
double r95237 = r95235 * r95236;
double r95238 = r95233 - r95237;
double r95239 = sqrt(r95238);
double r95240 = r95232 - r95239;
double r95241 = r95230 / r95240;
return r95241;
}



Bits error versus a



Bits error versus b



Bits error versus c
Results
Initial program 44.1
rmApplied flip-+44.1
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 *-un-lft-identity0.6
Applied div-inv0.6
Applied times-frac0.6
Applied associate-*r*0.6
Simplified0.5
Final simplification0.2
herbie shell --seed 2019291
(FPCore (a b c)
:name "Cubic critical, medium range"
:precision binary64
:pre (and (< 1.11022e-16 a 9.0072e15) (< 1.11022e-16 b 9.0072e15) (< 1.11022e-16 c 9.0072e15))
(/ (+ (- b) (sqrt (- (* b b) (* (* 3 a) c)))) (* 3 a)))