This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author anthonypjshaw
Recipients anthonypjshaw, lys.nikolaou, pablogsal
Date 2021-07-21.05:18:16
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1626844696.89.0.509830033076.issue44692@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2021-07-21 05:18:16anthonypjshawsetrecipients: + anthonypjshaw, lys.nikolaou, pablogsal
2021-07-21 05:18:16anthonypjshawsetmessageid: <1626844696.89.0.509830033076.issue44692@roundup.psfhosted.org>
2021-07-21 05:18:16anthonypjshawlinkissue44692 messages
2021-07-21 05:18:16anthonypjshawcreate