Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
BigDecimal#remainder
remainder(p1)
ext/bigdecimal/bigdecimal.c
View on GitHub ↗
static VALUE
BigDecimal_remainder(VALUE self, VALUE r) /* remainder */
{
VALUE f;
Real *d, *rv = 0;
f = BigDecimal_divremain(self, r, &d, &rv);
if (!NIL_P(f)) return f;
return VpCheckGetValue(rv);
}
remainder(value)
Returns the remainder from dividing by the value.
x.remainder(y) means x-y*(x/y).truncate