class Numeric
  def to_i?
    self == self.to_i rescue false
   end
end


ar = [25.000000, 24.999999, 25.000100, -2.1e120, -5e-2,  
      Float::NAN, Float::INFINITY,                       
      2r, 2.5r,                                          
      2+0i, 2+0.0i, 5-5i]                                

ar.each{|num| puts  }