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 mark.dickinson
Recipients mark.dickinson, rhettinger, serhiy.storchaka, tim.peters
Date 2021-06-08.07:52:22
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1623138742.36.0.69331700125.issue44339@roundup.psfhosted.org>
In-reply-to
Content
> What about math.pow(0.0, -1.0)? Should it return -inf or raise ZeroDivisionError?

Neither: it should raise ValueError, as it does now. This matches IEEE 754 along with the math module's mapping of IEEE 754 floating-point exceptions to Python exceptions.

> And what about math.pow(-0.0, -inf)?

This should return inf, the same as math.pow(0.0, -inf). The relevant clauses of the C standard and IEEE 754 cover both these cases; I should have written `math.pow(±0.0, -inf)` throughout my previous message.
History
Date User Action Args
2021-06-08 07:52:22mark.dickinsonsetrecipients: + mark.dickinson, tim.peters, rhettinger, serhiy.storchaka
2021-06-08 07:52:22mark.dickinsonsetmessageid: <1623138742.36.0.69331700125.issue44339@roundup.psfhosted.org>
2021-06-08 07:52:22mark.dickinsonlinkissue44339 messages
2021-06-08 07:52:22mark.dickinsoncreate