\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}\frac{-c}{b + \sqrt{b \cdot b - 3 \cdot \left(c \cdot a\right)}}(FPCore (a b c) :precision binary64 (/ (+ (- b) (sqrt (- (* b b) (* (* 3.0 a) c)))) (* 3.0 a)))
(FPCore (a b c) :precision binary64 (/ (- c) (+ b (sqrt (- (* b b) (* 3.0 (* c a)))))))
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 (((double) -(c)) / ((double) (b + ((double) sqrt(((double) (((double) (b * b)) - ((double) (3.0 * ((double) (c * a)))))))))));
}



Bits error versus a



Bits error versus b



Bits error versus c
Results
Initial program Error: 52.6 bits
SimplifiedError: 52.6 bits
rmApplied flip--Error: 52.6 bits
SimplifiedError: 0.5 bits
SimplifiedError: 0.5 bits
rmApplied distribute-rgt-neg-outError: 0.5 bits
Applied distribute-rgt-neg-outError: 0.5 bits
Applied distribute-frac-negError: 0.5 bits
Applied distribute-frac-negError: 0.5 bits
SimplifiedError: 0.1 bits
Final simplificationError: 0.1 bits
herbie shell --seed 2020204
(FPCore (a b c)
:name "Cubic critical, wide range"
:precision binary64
: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.0 a) c)))) (* 3.0 a)))