Negative number raised to an even power returns a negative number
- math
- power
Mathematically, the number -2 raised to the power of 2 will return 4. However, in Python the following occurs
In [7]: -2**2
Out[7]: -4
Negative number raised to an even power returns a negative number
Mathematically, the number -2 raised to the power of 2 will return 4. However, in Python the following occurs
In [7]: -2**2
Out[7]: -4