/* * call-seq: * flt.hash => integer * * Returns a hash code for this float. */ static VALUE flo_hash(VALUE num) { double d; int hash; d = RFLOAT_VALUE(num); hash = rb_memhash(&d, sizeof(d)); return INT2FIX(hash); }