Why is Infinity × 0 = NaN?
问题 IEEE 754 specifies the result of 1 / 0 as ∞ (Infinity). However, IEEE 754 then specifies the result of 0 × ∞ as NaN. This feels counter-intuitive : Why is 0 × ∞ not 0? We can think of 1 / 0 = ∞ as the limit of 1 / z as z tends to zero We can think of 0 × ∞ = 0 as the limit of 0 × z as z tends to ∞. Why does the IEEE standard follow intuition 1. but not 2.? 回答1: It is easier to understand the behavior of IEEE 754 floating point zeros and infinities if you do not think of them as being