1.

2.

因为IEEE 754标准规定:A NaN value is used to represent the result of certain invalid operations such as dividing zero by zero. 

for example, 1.0/0.0 has the value positive infinity, while the value of 1.0/-0.0 is negative infinity.

意思就是NaN=0.0/0.0  infinity=正浮点数/0.0  negative infinity=负浮点数/0.0  所以浮点数除以0.0不会报错

3.

4.

5.

posted on 2023-10-19 20:45  leapss  阅读(12)  评论(0)    收藏  举报