Solve the following quadratic equations. If there is no solution in the real domain, the result of NaN, which stands for Not-a-Number, might be printed out.
x2+ 2x + 1 = 0