Skip to content

Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →

instance method

BigDecimal#remainder

remainder(p1)

remainder(value)

Returns the remainder from dividing by the value.

x.remainder(y) means x-y*(x/y).truncate

See also #quo #round #precs #scale also in 3.2 · 3.1 · 3.0