Note that this isn’t quite 0. This is because of “roundoff
error” i.e., all computer calculations involving real numbers
round them to some extent, so you have to use some judgement
in deciding whether a result is correct. Here the numbers are
actually close to 0, so this is probably a root, or very close
to a root, of the polynomial.
Be careful about parentheses and precedence, e.g., x = ... / ( 2 * a )