[issue24526] Exponent function bug

2015-06-29 Thread bhaskar
Changes by bhaskar b.bhaskar.n...@gmail.com: Added file: http://bugs.python.org/file39830/pythonabc.png ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24526 ___

[issue24526] Exponent function bug

2015-06-29 Thread bhaskar
New submission from bhaskar: the value of a -ve number when raised by a power of even number always results in a +ve number. I tried it with -1**10 , -1**2, -9**4 these all are resulting in -ve numbers which is mathematically incorrect. ps. the same example is in the attachment --

[issue24526] Exponent function bug

2015-06-29 Thread R. David Murray
R. David Murray added the comment: This bit of python's precedence rules often catches people by surprise. ** binds tighter than -, so what python is evaluating is -(1**10). -- nosy: +r.david.murray resolution: - not a bug stage: - resolved status: open - closed type: compile error