In IEC 60559* floating-point arithmetic, pow(-1, ∞) is 1.
This is because all large
binary and decimal floating-point numbers are even, and thus so is infinity.
*this is the successor standard to ieee-754 and shares text in recent revisions, though I don't have direct access on this phone. You can find the specific pow specification in Annex F of the C99 standard.
Is the “thus” for ease of implementation? I.e., so that all floating-point numbers comparing greater than some threshold can be considered even without having to check for infinity?
No, it comes from the fact that floating point is binary and has limited precision. Think of it in terms of scientific notation. Here's an example in decimal. If we limit ourselves to four significant digits, then a number like:
3.101 * 10^3
is odd -- it's equivalent to 3101 (three thousand one hundred one). It's followed by 3.102*10^3 (3102), which is even, and 3.103*10^3 (3103), which is odd. But a number like:
3.101 * 10^5
which is equivalent to 310100, is even. It's followed by 3.102*10^5 (310200), which is also even, and 3.103*10^5 (310300), which is again even. If you have four significant digits and an exponent larger than 3, then you the value in the ones place will always be zero. Thus, the number is always a multiple of 10, and therefore even.
Floating point is the same, except it's binary. In a 32-bit float, you have 23 bits of mantissa after the decimal point. If the exponent is larger than 2^23, the ones place is always zero, so the number is guaranteed to be a multiple of 2, and therefore even.
It's not that they are considered even, they just are. There's no way to encode a large odd
even-radix floating point number. You have some (small, compared to the range that the exponent can encode) bits of significand and once you exhaust those all numbers are even (or divisible by ten in the rare decimal case).
This is because all large binary and decimal floating-point numbers are even, and thus so is infinity.
*this is the successor standard to ieee-754 and shares text in recent revisions, though I don't have direct access on this phone. You can find the specific pow specification in Annex F of the C99 standard.