\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}\left(c \cdot a\right) \cdot \frac{\frac{\sqrt[3]{1}}{\left(-b\right) - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}}{a}double f(double a, double b, double c) {
double r80328 = b;
double r80329 = -r80328;
double r80330 = r80328 * r80328;
double r80331 = 3.0;
double r80332 = a;
double r80333 = r80331 * r80332;
double r80334 = c;
double r80335 = r80333 * r80334;
double r80336 = r80330 - r80335;
double r80337 = sqrt(r80336);
double r80338 = r80329 + r80337;
double r80339 = r80338 / r80333;
return r80339;
}
double f(double a, double b, double c) {
double r80340 = c;
double r80341 = a;
double r80342 = r80340 * r80341;
double r80343 = 1.0;
double r80344 = cbrt(r80343);
double r80345 = b;
double r80346 = -r80345;
double r80347 = r80345 * r80345;
double r80348 = 3.0;
double r80349 = r80348 * r80341;
double r80350 = r80349 * r80340;
double r80351 = r80347 - r80350;
double r80352 = sqrt(r80351);
double r80353 = r80346 - r80352;
double r80354 = r80344 / r80353;
double r80355 = r80354 / r80341;
double r80356 = r80342 * r80355;
return r80356;
}



Bits error versus a



Bits error versus b



Bits error versus c
Results
Initial program 52.1
rmApplied flip-+52.1
Simplified0.5
rmApplied div-inv0.6
Applied times-frac0.5
Simplified0.5
rmApplied *-un-lft-identity0.5
Applied *-un-lft-identity0.5
Applied add-cube-cbrt0.5
Applied times-frac0.5
Applied times-frac0.5
Applied associate-*r*0.5
Simplified0.5
Final simplification0.5
herbie shell --seed 2019350 +o rules:numerics
(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)))