If the values divided are of the same sign, the remainder is the same as the modulus
(see divmod).
Otherwise, the remainder is the
modulus minus the value divided by.
static VALUE
BigDecimal_remainder(VALUE self, VALUE r) /* remainder */
{
VALUE f;
Real *d,*rv=0;
f = BigDecimal_divremain(self,r,&d,&rv);
if(f!=(VALUE)0) return f;
return ToValue(rv);
}