C#中double和float類型有兩個特殊值: Infinity(無窮大):5.0 / 0.0 = Infinity NaN(not a number):0.0 / 0.0 = NaN 計算表達式 0.0 / 0.0 = NaN, NaN和Infinity可以在表達式中使用: 10 + Infin ...
C#中double和float類型有兩個特殊值:
Infinity(無窮大):5.0 / 0.0 = Infinity
NaN(not a number):0.0 / 0.0 = NaN
計算表達式 0.0 / 0.0 = NaN,
NaN和Infinity可以在表達式中使用:
10 + Infinity = Infinity
10 + NaN = NaN
Infinity * 0 = 0
NaN * 0 = NaN