div(p1)
public
Divides big by other, returning the result.
Show source
/*
* call-seq:
* big / other => Numeric
* big.div(other) => Numeric
*
* Divides big by other, returning the result.
*/
static VALUE
rb_big_div(x, y)
VALUE x, y;
{
VALUE z;
switch (TYPE(y)) {
case T_FIXNUM:
y = rb_int2big(FIX2LONG(y));
break;
case T_BIGNUM:
break;
default:
return rb_num_coerce_bin(x, y);
}
bigdivmod(x, y, &z, 0);
return bignorm(z);
}