save_limit

BigDecimal.save_limit { ... } Class Public methods Excecute the provided block, but preserve the precision limit BigDecimal.limit(100) puts BigDecimal.limit BigDecimal.save_limit do BigDecimal.limit(200) puts BigDecimal.limit end puts BigDecimal.limit

save_exception_mode

BigDecimal.save_exception_mode { ... } Class Public methods Excecute the provided block, but preserve the exception mode BigDecimal.save_exception_mode do BigDecimal.mode(BigDecimal::EXCEPTION_OVERFLOW, false) BigDecimal.mode(BigDecimal::EXCEPTION_NaN, false) BigDecimal.new(BigDecimal('Infinity')) BigDecimal.new(BigDecimal('-Infinity')) BigDecimal(BigDecimal.new('NaN')) end For use with the BigDecimal::EXCEPTION_* See ::mode

new

new(initial, digits) Class Public methods Create a new BigDecimal object. initial The initial value, as an Integer, a Float, a Rational, a BigDecimal, or a String. If it is a String, spaces are ignored and unrecognized characters terminate the value. digits The number of significant digits, as a Fixnum. If omitted or 0, the number of significant digits is determined from the initial value. The actual number of significant digits used in computation is usually larger than

mode

BigDecimal.mode(mode, value) Class Public methods Controls handling of arithmetic exceptions and rounding. If no value is supplied, the current value is returned. Six values of the mode parameter control the handling of arithmetic exceptions: BigDecimal::EXCEPTION_NaN BigDecimal::EXCEPTION_INFINITY BigDecimal::EXCEPTION_UNDERFLOW BigDecimal::EXCEPTION_OVERFLOW BigDecimal::EXCEPTION_ZERODIVIDE BigDecimal::EXCEPTION_ALL For each mode parameter above, if the value set is false, compu

limit

BigDecimal.limit(digits) Class Public methods Limit the number of significant digits in newly created BigDecimal numbers to the specified value. Rounding is performed as necessary, as specified by ::mode. A limit of 0, the default, means no upper limit. The limit specified by this method takes less priority over any limit specified to instance methods such as ceil, floor, truncate, or round.

json_create

json_create(object) Class Public methods Import a JSON Marshalled object. method used for JSON marshalling support.

double_fig

BigDecimal.double_fig Class Public methods The ::double_fig class method returns the number of digits a Float number is allowed to have. The result depends upon the CPU and OS in use.

_load

_load(p1) Class Public methods Internal method used to provide marshalling support. See the Marshal module.

run

run() Instance Public methods

new

new(filename, interval) Class Public methods