[issue32171] Inconsistent results for fractional power of -infinity
Mark Dickinson
report at bugs.python.org
Wed Nov 29 16:54:05 EST 2017
Mark Dickinson <dickinsm at gmail.com> added the comment:
We follow C99 for this case, which says (C99 F 9.4.4):
> pow(−∞, y) returns +∞ for y > 0 and not an odd integer.
Oddly, this clause seems to be missing from section 9.2.1 of IEEE 754. Nevertheless, I believe it's the right thing to do.
IEEE 754 _does_ say:
> pow (x, y) signals the invalid operation exception for finite x < 0 and finite non-integer y.
The omission of -inf here is notable, and suggests that it's _not_ intended that the pow(-inf, 0.5) case should be considered invalid.
----------
nosy: -tim.peters
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32171>
_______________________________________
More information about the Python-bugs-list
mailing list