modulo

float.modulo(other) â float Instance Public methods Return the modulo after division of float by other. 6543.21.modulo(137) #=> 104.21 6543.21.modulo(137.24) #=> 92.9299999999996

magnitude

flt.magnitude â float Instance Public methods Returns the absolute value of flt. (-34.56).abs #=> 34.56 -34.56.abs #=> 34.56

inspect

inspect() Instance Public methods Alias for: to_s

infinite?

flt.infinite? â nil, -1, +1 Instance Public methods Returns nil, -1, or +1 depending on whether flt is finite, -infinity, or +infinity. (0.0).infinite? #=> nil (-1.0/0.0).infinite? #=> -1 (+1.0/0.0).infinite? #=> 1

hash

flt.hash â integer Instance Public methods Returns a hash code for this float.

floor

flt.floor â integer Instance Public methods Returns the largest integer less than or equal to flt. 1.2.floor #=> 1 2.0.floor #=> 2 (-1.2).floor #=> -2 (-2.0).floor #=> -2

finite?

flt.finite? â true or false Instance Public methods Returns true if flt is a valid IEEE floating point number (it is not infinite, and nan? is false).

fdiv

float.quo(numeric) â float Instance Public methods Returns float / numeric.

eql?

flt.eql?(obj) â true or false Instance Public methods Returns true only if obj is a Float with the same value as flt. Contrast this with Float#==, which performs type conversions. The result of NaN.eql?(NaN) is undefined, so the implementation-dependent value is returned. 1.0.eql?(1) #=> false

divmod

float.divmod(numeric) â array Instance Public methods See Numeric#divmod. 42.0.divmod 6 #=> [7, 0.0] 42.0.divmod 5 #=> [8, 2.0]