class

Float

v1_9_3_392 - Show latest stable - Superclass: Numeric

Float objects represent inexact real numbers using the native architecture’s double-precision floating point representation.

Floating point has a different arithmetic and is a inexact number. So you should know its esoteric system. see following:


When mathn is required, Float is changed to handle Complex numbers.

Constants

DIG = INT2FIX(DBL_DIG)

EPSILON = DBL2NUM(DBL_EPSILON)

INFINITY = DBL2NUM(INFINITY)

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 = DBL2NUM(DBL_MIN)

MIN_10_EXP = INT2FIX(DBL_MIN_10_EXP)

MIN_EXP = INT2FIX(DBL_MIN_EXP)

NAN = DBL2NUM(NAN)

RADIX = INT2FIX(FLT_RADIX)

ROUNDS = INT2FIX(FLT_ROUNDS)

Files

  • complex.c
  • ext/bigdecimal/lib/bigdecimal/util.rb
  • lib/mathn.rb
  • lib/rexml/xpath_parser.rb
  • numeric.c
  • rational.c