Handles solving of equations of degree <= 2