Flowdock

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

ROUNDS = INT2FIX(FLT_ROUNDS)

RADIX = INT2FIX(FLT_RADIX)

MANT_DIG = INT2FIX(DBL_MANT_DIG)

DIG = INT2FIX(DBL_DIG)

MIN_EXP = INT2FIX(DBL_MIN_EXP)

MAX_EXP = INT2FIX(DBL_MAX_EXP)

MIN_10_EXP = INT2FIX(DBL_MIN_10_EXP)

MAX_10_EXP = INT2FIX(DBL_MAX_10_EXP)

MIN = DBL2NUM(DBL_MIN)

MAX = DBL2NUM(DBL_MAX)

EPSILON = DBL2NUM(DBL_EPSILON)

INFINITY = DBL2NUM(INFINITY)

NAN = DBL2NUM(NAN)

Attributes

Show files where this class is defined (6 files)
Register or log in to add new notes.