class

Float

v1_9_2_180 - Show latest stable - Superclass: Numeric

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


BigDecimal utility library.

To use these functions, require ‘bigdecimal/util’

The following methods are provided to convert other types to BigDecimals:

String#to_d -> BigDecimal
Float#to_d -> BigDecimal
Rational#to_d -> BigDecimal

The following method is provided to convert BigDecimals to other types:

BigDecimal#to_r -> Rational

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