Skip to content

End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →

instance method

BigDecimal#mult

mult(value, digits)

Multiply by the specified value.

e.g.

Example
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 BigDecimal.mode.

See also #modulo #nan? #inspect #nonzero? also in 3.3 · 3.2 · 3.1