Did I find the right examples for you? yes no

All Samples(13)  |  Call(8)  |  Derive(0)  |  Import(5)

src/s/y/Sypy-HEAD/objspace/std/floatobject.py   Sypy(Download)
from pypy.objspace.std.noneobject import W_NoneObject
from pypy.objspace.std.longobject import W_LongObject
from pypy.rlib.rarithmetic import ovfcheck_float_to_int, intmask, LONG_BIT
from pypy.rlib.rfloat import (
    isinf, isnan, isfinite, INFINITY, NAN, copysign, formatd,
def int__Float(space, w_value):
    try:
        value = ovfcheck_float_to_int(w_value.floatval)
    except OverflowError:
        return space.long(w_value)
def trunc__Float(space, w_floatobj):
    whole = math.modf(w_floatobj.floatval)[1]
    try:
        value = ovfcheck_float_to_int(whole)
    except OverflowError:
        # This must return the same hash as an equal int or long.
        try:
            x = ovfcheck_float_to_int(intpart)
            # Fits in a C long == a Python int, so is its own hash.
            return x

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/objspace/std/floatobject.py   plexnet(Download)
from pypy.objspace.std.objspace import *
from pypy.interpreter import gateway
from pypy.objspace.std.noneobject import W_NoneObject
from pypy.objspace.std.longobject import W_LongObject
from pypy.rlib.rarithmetic import ovfcheck_float_to_int, intmask, isinf
def int__Float(space, w_value):
    try:
        value = ovfcheck_float_to_int(w_value.floatval)
    except OverflowError:
        return space.long(w_value)
        # This must return the same hash as an equal int or long.
        try:
            x = ovfcheck_float_to_int(intpart)
            # Fits in a C long == a Python int, so is its own hash.
            return x

src/s/y/Sypy-HEAD/module/rctime/interp_time.py   Sypy(Download)
from pypy.interpreter.gateway import unwrap_spec
from pypy.rpython.lltypesystem import lltype
from pypy.rlib.rarithmetic import ovfcheck_float_to_int, intmask
from pypy.rlib import rposix
from pypy.translator.tool.cbuild import ExternalCompilationInfo
        seconds = space.float_w(w_seconds)
    try:
        seconds = ovfcheck_float_to_int(seconds)
        t = rffi.r_time_t(seconds)
        if rffi.cast(lltype.Signed, t) != seconds:

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/module/rctime/interp_time.py   plexnet(Download)
from pypy.interpreter.baseobjspace import W_Root, ObjSpace
from pypy.rpython.lltypesystem import lltype
from pypy.rlib.rarithmetic import ovfcheck_float_to_int
from pypy.rlib import rposix
from pypy.translator.tool.cbuild import ExternalCompilationInfo
        seconds = space.float_w(w_seconds)
    try:
        ovfcheck_float_to_int(seconds)
    except OverflowError:
        raise OperationError(space.w_ValueError,

src/s/y/Sypy-HEAD/translator/c/test/test_typed.py   Sypy(Download)
    def test_ovfcheck_float_to_int(self):
        from pypy.rlib.rarithmetic import ovfcheck_float_to_int
 
        def func(fl):
            try:
                return ovfcheck_float_to_int(fl)