Added more functionality to handle the NaN(not a number) results.
Instead it will display only the real X or say that the answer is that X
is an imaginary number.