method
==
==(p1)
public
Hide source
VALUE rb_float_equal(VALUE x, VALUE y) { volatile double a, b; if (RB_TYPE_P(y, T_FIXNUM) || RB_TYPE_P(y, T_BIGNUM)) { return rb_integer_float_eq(y, x); } else if (RB_TYPE_P(y, T_FLOAT)) { b = RFLOAT_VALUE(y); #if defined(_MSC_VER) && _MSC_VER < 1300 if (isnan(b)) return Qfalse; #endif } else { return num_equal(x, y); } a = RFLOAT_VALUE(x); #if defined(_MSC_VER) && _MSC_VER < 1300 if (isnan(a)) return Qfalse; #endif return (a == b)?Qtrue:Qfalse; }