>(p1)
public
true if flt is greater than other.
Show source
static VALUE
flo_gt(VALUE x, VALUE y)
{
double a, b;
a = RFLOAT_VALUE(x);
switch (TYPE(y)) {
case T_FIXNUM:
b = (double)FIX2LONG(y);
break;
case T_BIGNUM:
b = rb_big2dbl(y);
break;
case T_FLOAT:
b = RFLOAT_VALUE(y);
if (isnan(b)) return Qfalse;
break;
default:
return rb_num_coerce_relop(x, y, '>');
}
if (isnan(a)) return Qfalse;
return (a > b)?Qtrue:Qfalse;
}