/*
 *  call-seq:
 *     big - other  => Numeric
 *
 *  Subtracts other from big, returning the result.
 */

VALUE
rb_big_minus(x, y)
    VALUE x, y;
{
    switch (TYPE(y)) {
      case T_FIXNUM:
        y = rb_int2big(FIX2LONG(y));
        /* fall through */
      case T_BIGNUM:
        return bignorm(bigadd(x, y, 0));

      case T_FLOAT:
        return rb_float_new(rb_big2dbl(x) - RFLOAT(y)->value);

      default:
        return rb_num_coerce_bin(x, y);
    }
}