Flowdock

Float objects represent 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

EPSILON = DBL2NUM(DBL_EPSILON)

MAX = DBL2NUM(DBL_MAX)

MIN = DBL2NUM(DBL_MIN)

MAX_10_EXP = INT2FIX(DBL_MAX_10_EXP)

MIN_10_EXP = INT2FIX(DBL_MIN_10_EXP)

MAX_EXP = INT2FIX(DBL_MAX_EXP)

MIN_EXP = INT2FIX(DBL_MIN_EXP)

DIG = INT2FIX(DBL_DIG)

MANT_DIG = INT2FIX(DBL_MANT_DIG)

RADIX = INT2FIX(FLT_RADIX)

ROUNDS = INT2FIX(FLT_ROUNDS)

Attributes

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