在 IEEE 754 标准中的哪个位置指定了“Inf * 0”的结果?
Where in the IEEE 754 standard is the result of `Inf * 0` specified?
IEEE 754-2019 标准第 6.1 节规定:
The behavior of infinity in floating-point arithmetic is derived from the limiting cases of real arithmetic with operands of arbitrarily large magnitude, when such a limit exists. Infinities shall be interpreted in the affine sense, that is: −∞ < {every finite number} < +∞.
但是,在我使用的所有实现中 Inf * 0 = NaN
,这似乎与引用的文本相矛盾。
在 IEEE 754 标准的哪个位置指定了 Inf * 0
的结果?
IEEE 754-2008 7.2 说:
The invalid operation exception is signaled if and only if there is no usefully definable result. In these cases
the operands are invalid for the operation to be performed.
For operations producing results in floating-point format, the default result of an operation that signals the invalid operation exception shall be a quiet NaN that should provide some diagnostic information (see 6.2). These operations are:
…
b) multiplication: multiplication(0, ∞) or multiplication(∞, 0)
…
754-2019 的接近最终稿与上面引用的部分相同。
IEEE 754-2019 标准第 6.1 节规定:
The behavior of infinity in floating-point arithmetic is derived from the limiting cases of real arithmetic with operands of arbitrarily large magnitude, when such a limit exists. Infinities shall be interpreted in the affine sense, that is: −∞ < {every finite number} < +∞.
但是,在我使用的所有实现中 Inf * 0 = NaN
,这似乎与引用的文本相矛盾。
在 IEEE 754 标准的哪个位置指定了 Inf * 0
的结果?
IEEE 754-2008 7.2 说:
The invalid operation exception is signaled if and only if there is no usefully definable result. In these cases the operands are invalid for the operation to be performed.
For operations producing results in floating-point format, the default result of an operation that signals the invalid operation exception shall be a quiet NaN that should provide some diagnostic information (see 6.2). These operations are:
…
b) multiplication: multiplication(0, ∞) or multiplication(∞, 0)
…
754-2019 的接近最终稿与上面引用的部分相同。