Float
Float objects represent inexact real numbers using the native architecture’s double-precision floating point representation.
Floating point has a different arithmetic and is an inexact number. So you should know its esoteric system. See following:
Constants
DIG = INT2FIX(DBL_DIG)
EPSILON = DBL2NUM(DBL_EPSILON)
INFINITY = DBL2NUM(HUGE_VAL)
MANT_DIG = INT2FIX(DBL_MANT_DIG)
MAX = DBL2NUM(DBL_MAX)
MAX_10_EXP = INT2FIX(DBL_MAX_10_EXP)
MAX_EXP = INT2FIX(DBL_MAX_EXP)
MIN = The smallest positive normalized number in a double-precision floating point.\n\nUsually defaults to 2.2250738585072014e-308.\n\nIf the platform supports denormalized numbers,\nthere are numbers between zero and Float:
MIN_10_EXP = INT2FIX(DBL_MIN_10_EXP)
MIN_EXP = INT2FIX(DBL_MIN_EXP)
NAN = DBL2NUM(nan(""))
RADIX = INT2FIX(FLT_RADIX)
ROUNDS = Represents the rounding mode for floating point addition.\n\nUsually defaults to 1, rounding to the nearest number.\n\nOther modes include:\n\n-1:: Indeterminable\n0:: Rounding towards zero\n1:: Rounding to the nearest number\n2:: Rounding towards positive infinity\n3:
Files
- complex.c
- ext/bigdecimal/lib/bigdecimal/util.rb
- lib/rexml/xpath_parser.rb
- numeric.c
- rational.c