/ 2

div(value, digits)quo(value) Instance Public methods Divide by the specified value. e.g. c = a.div(b,n) 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. If digits is 0, the result is the same as the / operator. If not, the result is an integer BigDecimal, by analogy with Numeric#div. The alias quo is provided since div(value, 0) is the same as computing the quotient; see #di

-@

-@ Instance Public methods Return the negation of self. e.g. b = -a b == a * -1

-

sub(value, digits) Instance Public methods Subtract the specified value. e.g. c = a.sub(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.

+@

+@ Instance Public methods Return self. e.g. b = +a # b == a

+

add(value, digits) Instance Public methods Add the specified value. e.g. c = a.add(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.

**

big_decimal ** exp รข big_decimal Instance Public methods It is a synonym of #power.

*

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.

%

a % b Instance Public methods Returns the modulus from dividing by b. See #divmod.

ver

ver() Class Public methods Returns the BigDecimal version number.

save_rounding_mode

BigDecimal.save_rounding_mode { ... } Class Public methods Excecute the provided block, but preserve the rounding mode BigDecimal.save_exception_mode do BigDecimal.mode(BigDecimal::ROUND_MODE, :up) puts BigDecimal.mode(BigDecimal::ROUND_MODE) end For use with the BigDecimal::ROUND_* See ::mode