Did I find the right examples for you? yes no

All Samples(21)  |  Call(11)  |  Derive(0)  |  Import(10)

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/rlib/objectmodel.py   plexnet(Download)
    In RPython, floats cannot be used with ints in dicts, anyway.
    from pypy.rlib.rarithmetic import intmask, isinf, isnan
    if isinf(f):
        if f < 0.0:

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/rlib/rstruct/ieee.py   plexnet(Download)
import math
from pypy.rlib.rarithmetic import r_longlong, isinf, isnan, INFINITY, NAN
def pack_float(result, number, size, bigendian):
            sign = 0x00
        if isinf(number):
            man, e = 1.0, bias + 1

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/objspace/std/formatting.py   plexnet(Download)
String formatting routines.
from pypy.rlib.unroll import unrolling_iterable
from pypy.rlib.rarithmetic import ovfcheck, formatd_overflow, isnan, isinf
        if isnan(x):
            r = 'nan'
        elif isinf(x):
            if x < 0:
                r = '-inf'

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/translator/c/primitive.py   plexnet(Download)
import sys
from pypy.rlib.objectmodel import Symbolic, ComputedIntSymbolic
from pypy.rlib.objectmodel import CDefinedIntSymbolic
from pypy.rlib.rarithmetic import r_longlong, isinf, isnan
from pypy.rpython.lltypesystem.lltype import *
def name_float(value, db):
    if isinf(value):
        if value > 0:
            return '(Py_HUGE_VAL)'
def name_singlefloat(value, db):
    value = float(value)
    if isinf(value):
        if value > 0:
            return '((float)Py_HUGE_VAL)'

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 eq__Float_Long(space, w_float1, w_long2):
    # XXX naive implementation
    x = w_float1.floatval
    if isinf(x) or math.floor(x) != x:
        return space.w_False
def lt__Float_Long(space, w_float1, w_long2):
    # XXX naive implementation
    x = w_float1.floatval
    if isinf(x):
        return space.newbool(x < 0.0)

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/translator/jvm/generator.py   plexnet(Download)
from pypy.rpython.ootypesystem import ootype
from pypy.rlib.objectmodel import CDefinedIntSymbolic
from pypy.rlib.rarithmetic import isnan, isinf
from pypy.translator.oosupport.constant import push_constant
import pypy.translator.jvm.typesystem as jvm
    def _push_double_constant(self, value):
        if isnan(value):
        elif isinf(value):
            if value > 0: jvm.DOUBLEPOSINF.load(self)

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/translator/cli/ilgenerator.py   plexnet(Download)
from pypy.rpython.lltypesystem.lltype import Signed, Unsigned, Void, Bool, Float
from pypy.rpython.lltypesystem.lltype import SignedLongLong, UnsignedLongLong
from pypy.rpython.lltypesystem import rffi
from pypy.rlib.objectmodel import CDefinedIntSymbolic
from pypy.rlib.rarithmetic import isnan, isinf
            ilasm.opcode('ldc.i4', ord(value))
        elif TYPE is ootype.Float:
            if isinf(value):
                if value < 0.0:
                    ilasm.opcode('ldc.r8', '(00 00 00 00 00 00 f0 ff)')

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/translator/c/node.py   plexnet(Download)
from pypy.translator.c.support import c_char_array_constant, barebonearray
from pypy.translator.c.primitive import PrimitiveType, name_signed
from pypy.rlib.rarithmetic import isinf, isnan
from pypy.translator.c import extfunc
from pypy.translator.tool.cbuild import ExternalCompilationInfo
            expr = 'NULL /*%s*/' % node.name
            node.where_to_copy_me.append('&%s' % access_expr)
        elif typeOf(value) == Float and (isinf(value) or isnan(value)):
            db.late_initializations.append(('%s' % access_expr, db.get(value)))
            expr = '0.0 /* patched later by %sinfinity */' % (

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/rlib/test/test_ieee.py   plexnet(Download)
import sys
from pypy.rlib.rstruct.ieee import pack_float, unpack_float
from pypy.rlib.rarithmetic import isinf, isnan
testcases = [
def test_correct_tests():
    import struct
    for number, size, bigendian, expected in testcases:
        if sys.version < (2, 5) and (isinf(number) or isnan(number)):
            continue    # 'inf' and 'nan' unsupported in CPython 2.4's struct

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/rpython/test/test_rfloat.py   plexnet(Download)
import sys
from pypy.translator.translator import TranslationContext
from pypy.rpython.test import snippet
from pypy.rpython.test.tool import BaseRtypingTest, LLRtypeMixin, OORtypeMixin
from pypy.rlib.rarithmetic import r_int, r_uint, r_longlong, r_singlefloat,\