Message397922
Powers with negative bases do not observe the same rules that float_pow/long_pow do when it comes to returning negative results/
Example:
> -2 ** 2
-4
>>> x = -2
>>> y = 2
>>> x ** y
4
>>> -2. ** 2.
-4.0
>>> x = -2.
>>> y = 2.
>>> x ** y
4.0
Tested on 3.8, 3.9 and 3.10, they all have the same bug. |
|
Date |
User |
Action |
Args |
2021-07-21 05:18:16 | anthonypjshaw | set | recipients:
+ anthonypjshaw, lys.nikolaou, pablogsal |
2021-07-21 05:18:16 | anthonypjshaw | set | messageid: <1626844696.89.0.509830033076.issue44692@roundup.psfhosted.org> |
2021-07-21 05:18:16 | anthonypjshaw | link | issue44692 messages |
2021-07-21 05:18:16 | anthonypjshaw | create | |
|