Solves quadratic equations while verifying validy of input. Doesn't solve when no real roots exist.