Did I find the right examples for you? yes no

All Samples(22)  |  Call(13)  |  Derive(0)  |  Import(9)

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):
        prec = 52
    if isnan(number):
        sign = 0x80
        man, e = 1.5, bias + 1

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:
            return -271828
            return 314159
    elif isnan(f):

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
    def format_float(self, w_value, char):
        space = self.space
        x = space.float_w(maybe_float(space, w_value))
        if isnan(x):
            r = 'nan'

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 *
            return '(-Py_HUGE_VAL)'
    elif isnan(value):
        return '(Py_HUGE_VAL/Py_HUGE_VAL)'
            return '((float)-Py_HUGE_VAL)'
    elif isnan(value):
        # XXX are these expressions ok?
        return '((float)(Py_HUGE_VAL/Py_HUGE_VAL))'

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.r8', '(00 00 00 00 00 00 f0 7f)')
            elif isnan(value):
                ilasm.opcode('ldc.r8', '(00 00 00 00 00 00 f8 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
        assert struct.pack(fmt, number) == expected
        res, = struct.unpack(fmt, expected)
        assert (isnan(res) and isnan(number)) or \
                res == number or abs(res - number) < 1E-6
        assert len(input) == size
        res = unpack_float(input, bigendian)
        if isnan(res) and isnan(expected):

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,\