예제 #1
0
파일: numeric.py 프로젝트: pycket/pycket
def unsafe_fxquotient(a, b):
    return values.W_Fixnum(rarithmetic.int_c_div(a.value, b.value))
예제 #2
0
def unsafe_fxquotient(a, b):
    return values.W_Fixnum(rarithmetic.int_c_div(a.value, b.value))
예제 #3
0
def int_floordiv(space, n, m):
    return space.wrap(int_c_div(n, m))
예제 #4
0
def int_floordiv(space, n, m):
    return space.newint(int_c_div(n, m))
예제 #5
0
def int_floordiv_ovf(x, y):
    # JIT: intentionally not short-circuited to produce only one guard
    # and to remove the check fully if one of the arguments is known
    if (x == -sys.maxint - 1) & (y == -1):
        raise OverflowError("integer division")
    return int_c_div(x, y)