返回顶部

收藏

Value of not-a-number

更多
nan = 0.0/0.0;     # zero divided by zero is not-a-number
nan < 0            # false: it is not less than zero
nan > 0            # false: it is not greater than zero
nan == 0           # false: it is not equal to zero
nan == nan         # false: it is not even equal to itself!
nan.equal?(nan)    # this is true, of course

标签:Ruby,Number

收藏

0人收藏

支持

0

反对

0

发表评论