Constants in Float : float « Number « Ruby






Constants in Float

puts Float::MAX     # => 1.79769313486232e+308: may be platform dependent
puts Float::MIN     # => 2.2250738585072e-308
puts Float::EPSILON # => 2.22044604925031e-16: difference between adjacent floats

 








Related examples in the same category

1.Floating Point Numbers
2.Check whether a number is finite or infinite with the finite? and infinite?
3.Check whether a floating-point value is a number at all with Float's nan?
4.ArgumentError: invalid value for Float(): "99.44% pure"
5.Float value step
6.Float predicates
7.Class constants
8.Rounding methods
9.Absolute value and sign
10.Round a float
11.round Rounds to the nearest integer.