Message307259
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. |
|
Date |
User |
Action |
Args |
2017-11-29 21:54:05 | mark.dickinson | set | recipients:
+ mark.dickinson, pdenis |
2017-11-29 21:54:05 | mark.dickinson | set | messageid: <1511992445.73.0.213398074469.issue32171@psf.upfronthosting.co.za> |
2017-11-29 21:54:05 | mark.dickinson | link | issue32171 messages |
2017-11-29 21:54:05 | mark.dickinson | create | |
|