precs

precs Instance Public methods Returns an Array of two Integer values. The first value is the current number of significant digits in the BigDecimal. The second value is the maximum number of significant digits for the BigDecimal.

power

power(n)power(n, prec) Instance Public methods Returns the value raised to the power of n. Note that n must be an Integer. Also available as the operator **

nonzero?

nonzero?() Instance Public methods Returns self if the value is non-zero, nil otherwise.

nan?

nan?() Instance Public methods Returns True if the value is Not a Number

mult

mult(value, digits) Instance Public methods Multiply by the specified value. e.g. c = a.mult(b,n) c = a * b digits If specified and less than the number of significant digits of the result, the result is rounded to that number of digits, according to ::mode.

modulo

a.modulo(b) Instance Public methods Returns the modulus from dividing by b. See #divmod.

inspect

inspect() Instance Public methods Returns debugging information about the value as a string of comma-separated values in angle brackets with a leading #: ::new(â1234.5678â).inspect -> â#<BigDecimal:b7ea1130,'0.12345678E4',8(12)>â The first part is the address, the second is the value as a string, and the final part ss(mm) is the current number of significant digits and the maximum number of significant digits, respectively.

infinite?

infinite?() Instance Public methods Returns nil, -1, or +1 depending on whether the value is finite, -infinity, or +infinity.

hash

hash Instance Public methods Creates a hash for this BigDecimal. Two BigDecimals with equal sign, fractional part and exponent have the same hash.

frac

frac() Instance Public methods Return the fractional part of the number.