Mark Dickinson <dicki...@gmail.com> added the comment: > 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. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue44339> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com