\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}\frac{1}{\frac{b + \sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)}}{-c}}double code(double a, double b, double c) {
return (((double) (((double) -(b)) + ((double) sqrt(((double) (((double) (b * b)) - ((double) (((double) (3.0 * a)) * c)))))))) / ((double) (3.0 * a)));
}
double code(double a, double b, double c) {
return (1.0 / (((double) (b + ((double) sqrt(((double) (((double) (b * b)) - ((double) (3.0 * ((double) (a * c)))))))))) / ((double) -(c))));
}



Bits error versus a



Bits error versus b



Bits error versus c
Results
Initial program Error: 44.2 bits
SimplifiedError: 44.2 bits
rmApplied flip--Error: 44.3 bits
SimplifiedError: 0.5 bits
SimplifiedError: 0.5 bits
rmApplied associate-/r*Error: 0.5 bits
SimplifiedError: 0.4 bits
rmApplied clear-numError: 0.5 bits
SimplifiedError: 0.3 bits
Final simplificationError: 0.3 bits
herbie shell --seed 2020200
(FPCore (a b c)
:name "Cubic critical, medium range"
:precision binary64
:pre (and (< 1.1102230246251565e-16 a 9007199254740992.0) (< 1.1102230246251565e-16 b 9007199254740992.0) (< 1.1102230246251565e-16 c 9007199254740992.0))
(/ (+ (- b) (sqrt (- (* b b) (* (* 3.0 a) c)))) (* 3.0 a)))