\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}\frac{c}{\left(-b\right) - \sqrt{(-3 \cdot \left(a \cdot c\right) + \left(b \cdot b\right))_*}}double f(double a, double b, double c, double __attribute__((unused)) d) {
double r14090727 = b;
double r14090728 = -r14090727;
double r14090729 = r14090727 * r14090727;
double r14090730 = 3.0;
double r14090731 = a;
double r14090732 = r14090730 * r14090731;
double r14090733 = c;
double r14090734 = r14090732 * r14090733;
double r14090735 = r14090729 - r14090734;
double r14090736 = sqrt(r14090735);
double r14090737 = r14090728 + r14090736;
double r14090738 = r14090737 / r14090732;
return r14090738;
}
double f(double a, double b, double c, double __attribute__((unused)) d) {
double r14090739 = c;
double r14090740 = b;
double r14090741 = -r14090740;
double r14090742 = -3.0;
double r14090743 = a;
double r14090744 = r14090743 * r14090739;
double r14090745 = r14090740 * r14090740;
double r14090746 = fma(r14090742, r14090744, r14090745);
double r14090747 = sqrt(r14090746);
double r14090748 = r14090741 - r14090747;
double r14090749 = r14090739 / r14090748;
return r14090749;
}



Bits error versus a



Bits error versus b



Bits error versus c



Bits error versus d
Initial program 52.8
rmApplied flip-+52.8
Applied associate-/l/52.8
Simplified0.5
rmApplied associate-*r*0.5
rmApplied times-frac0.5
Simplified0.4
Simplified0.4
rmApplied pow10.4
Applied pow10.4
Applied pow-prod-down0.4
Simplified0.1
Final simplification0.1
herbie shell --seed 2019112 +o rules:numerics
(FPCore (a b c d)
:name "Cubic critical, wide range"
:pre (and (< 4.930380657631324e-32 a 2.028240960365167e+31) (< 4.930380657631324e-32 b 2.028240960365167e+31) (< 4.930380657631324e-32 c 2.028240960365167e+31))
(/ (+ (- b) (sqrt (- (* b b) (* (* 3 a) c)))) (* 3 a)))