[issue44339] Discrepancy between math.pow(0.0, -inf) and 0.0**-inf

2021-06-12 Thread Mark Dickinson
Change by Mark Dickinson : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue44339] Discrepancy between math.pow(0.0, -inf) and 0.0**-inf

2021-06-12 Thread Mark Dickinson
Mark Dickinson added the comment: New changeset 4a42cebf6dd769e2fa4e234a9e91093b3ad1cb63 by Mark Dickinson in branch 'main': bpo-44339: Fix math.pow corner case to comply with IEEE 754 (GH-26606) https://github.com/python/cpython/commit/4a42cebf6dd769e2fa4e234a9e91093b3ad1cb63 --

[issue44339] Discrepancy between math.pow(0.0, -inf) and 0.0**-inf

2021-06-09 Thread Steven D'Aprano
Change by Steven D'Aprano : -- nosy: +steven.daprano ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44339] Discrepancy between math.pow(0.0, -inf) and 0.0**-inf

2021-06-08 Thread Mark Dickinson
Change by Mark Dickinson : -- keywords: +patch pull_requests: +25189 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26606 ___ Python tracker ___

[issue44339] Discrepancy between math.pow(0.0, -inf) and 0.0**-inf

2021-06-08 Thread Mark Dickinson
Mark Dickinson 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.

[issue44339] Discrepancy between math.pow(0.0, -inf) and 0.0**-inf

2021-06-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What about math.pow(0.0, -1.0)? Should it return -inf or raise ZeroDivisionError? And what about math.pow(-0.0, -inf)? Should it return inf, -inf or nan or raise an exception? -- nosy: +serhiy.storchaka ___

[issue44339] Discrepancy between math.pow(0.0, -inf) and 0.0**-inf

2021-06-07 Thread Raymond Hettinger
Raymond Hettinger added the comment: +1 from me as well. -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing

[issue44339] Discrepancy between math.pow(0.0, -inf) and 0.0**-inf

2021-06-07 Thread Tim Peters
Tim Peters added the comment: +1. Although, to be fair, I'd personally be happy if (+-0)**inf returned, say, 1.375 instead ;-) -- nosy: +tim.peters ___ Python tracker ___

[issue44339] Discrepancy between math.pow(0.0, -inf) and 0.0**-inf

2021-06-07 Thread Mark Dickinson
Change by Mark Dickinson : -- components: +Library (Lib) type: -> enhancement ___ Python tracker ___ ___ Python-bugs-list mailing

[issue44339] Discrepancy between math.pow(0.0, -inf) and 0.0**-inf

2021-06-07 Thread Mark Dickinson
New submission from Mark Dickinson : For floats x and y, x ** y and math.pow(x, y) mostly agree. There are three points of difference: 1. if x is finite and negative and y is finite and non-integral, then x ** y returns a complex number, while math.pow(x, y) raises ValueError 2. for cases