Inspect a not-a-number : nan « Number « Ruby






Inspect a not-a-number


val = 0.0/0.0
val.inspect # => "NaN"

 








Related examples in the same category

1.Value of not-a-number
2.Is it not a number
3.Is it an integer
4.If it is an integer