Message395313
> 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. |
|
Date |
User |
Action |
Args |
2021-06-08 07:52:22 | mark.dickinson | set | recipients:
+ mark.dickinson, tim.peters, rhettinger, serhiy.storchaka |
2021-06-08 07:52:22 | mark.dickinson | set | messageid: <1623138742.36.0.69331700125.issue44339@roundup.psfhosted.org> |
2021-06-08 07:52:22 | mark.dickinson | link | issue44339 messages |
2021-06-08 07:52:22 | mark.dickinson | create | |
|