@staticmethod
    def float_to_w_int(space, floatvalue):
        try:
            # the extra case makes sure that this method returns
            # bignums for the same numbers as the parser does.
            # this is checked in rubyspecs
            if floatvalue < 0:
                return space.newint(-ovfcheck_float_to_int(-floatvalue))
            else:
                return space.newint(ovfcheck_float_to_int(floatvalue))
        except OverflowError:
            return space.newbigint_fromfloat(floatvalue)
dataset/ETHPy150Open topazproject/topaz/topaz/objects/floatobject.py/W_FloatObject.float_to_w_int/original