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



Bits error versus a



Bits error versus b



Bits error versus c
Results
Initial program Error: 44.2 bits
SimplifiedError: 44.2 bits
Taylor expanded around inf Error: 11.8 bits
Final simplificationError: 11.8 bits
herbie shell --seed 2020200
(FPCore (a b c)
:name "Quadratic roots, 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) (* (* 4.0 a) c)))) (* 2.0 a)))