method
quo

v1_9_1_378 -
Show latest stable
-
0 notes -
Class: Rational
- 1_8_6_287
- 1_8_7_72
- 1_8_7_330
- 1_9_1_378 (0)
- 1_9_2_180 (38)
- 1_9_3_125 (0)
- 1_9_3_392 (0)
- 2_1_10 (-2)
- 2_2_9 (0)
- 2_4_6 (0)
- 2_5_5 (0)
- 2_6_3 (0)
- What's this?
quo(p1)
public
Hide source
static VALUE nurat_div(VALUE self, VALUE other) { switch (TYPE(other)) { case T_FIXNUM: case T_BIGNUM: if (f_zero_p(other)) rb_raise_zerodiv(); { get_dat1(self); return f_muldiv(self, dat->num, dat->den, other, ONE, '/'); } case T_FLOAT: return rb_funcall(f_to_f(self), '/', 1, other); case T_RATIONAL: if (f_zero_p(other)) rb_raise_zerodiv(); { get_dat2(self, other); return f_muldiv(self, adat->num, adat->den, bdat->num, bdat->den, '/'); } default: return rb_num_coerce_bin(self, other, '/'); } }