Did I find the right examples for you? yes no

All Samples(88)  |  Call(53)  |  Derive(0)  |  Import(35)

src/s/y/Sypy-HEAD/translator/exceptiontransform.py   Sypy(Download)
from pypy.rpython.rmodel import inputconst
from pypy.rlib.rarithmetic import r_uint, r_longlong, r_ulonglong
from pypy.rlib.rarithmetic import r_singlefloat
from pypy.rlib.debug import ll_assert
from pypy.annotation import model as annmodel
                       lltype.UnsignedLongLong: r_ulonglong(-1),
                       lltype.Float: -1.0,
                       lltype.SingleFloat: r_singlefloat(-1.0),
                       lltype.Char: chr(255),
                       lltype.UniChar: unichr(0xFFFF), # XXX is this always right?

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/translator/exceptiontransform.py   plexnet(Download)
from pypy.rpython.rmodel import inputconst
from pypy.rlib.rarithmetic import r_uint, r_longlong, r_ulonglong
from pypy.rlib.rarithmetic import r_singlefloat
from pypy.rlib.debug import ll_assert
from pypy.annotation import model as annmodel
                       lltype.UnsignedLongLong: r_ulonglong(-1),
                       lltype.Float: -1.0,
                       lltype.SingleFloat: r_singlefloat(-1.0),
                       lltype.Char: chr(255),
                       lltype.UniChar: unichr(0xFFFF), # XXX is this always right?

src/s/y/Sypy-HEAD/rpython/lltypesystem/lltype.py   Sypy(Download)
import py
from pypy.rlib.rarithmetic import (r_int, r_uint, intmask, r_singlefloat,
                                   r_ulonglong, r_longlong, r_longfloat,
                                   base_int, normalizedinttype, longlongmask)
from pypy.rlib.objectmodel import Symbolic
 
Float       = Primitive("Float",       0.0)                  # C type 'double'
SingleFloat = Primitive("SingleFloat", r_singlefloat(0.0))   # C type 'float'
LongFloat   = Primitive("LongFloat",   r_longfloat(0.0))     # C type 'long double'
r_singlefloat._TYPE = SingleFloat
    elif ORIG == Float:
        if TGT == SingleFloat:
            return r_singlefloat(value)
        elif TGT == LongFloat:
            return r_longfloat(value)

src/s/y/Sypy-HEAD/rpython/lltypesystem/ll2ctypes.py   Sypy(Download)
from pypy.rlib.objectmodel import Symbolic, ComputedIntSymbolic
from pypy.tool.uid import fixid
from pypy.rlib.rarithmetic import r_singlefloat, r_longfloat, base_int, intmask
from pypy.rlib.rarithmetic import is_emulated_long, maxint
from pypy.annotation import model as annmodel
        if isinstance(cobj, ctypes.c_float):
            cobj = cobj.value
        llobj = r_singlefloat(cobj)
    elif T is lltype.LongFloat:
        if isinstance(cobj, ctypes.c_longdouble):

src/s/y/Sypy-HEAD/jit/metainterp/blackhole.py   Sypy(Download)
    def bhimpl_cast_float_to_singlefloat(a):
        from pypy.rlib.rarithmetic import r_singlefloat
        a = longlong.getrealfloat(a)
        a = r_singlefloat(a)
        return longlong.singlefloat2int(a)

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/rpython/lltypesystem/lltype.py   plexnet(Download)
import py
from pypy.rlib.rarithmetic import r_int, r_uint, intmask, r_singlefloat
from pypy.rlib.rarithmetic import r_ulonglong, r_longlong, base_int
from pypy.rlib.rarithmetic import normalizedinttype
from pypy.rlib.objectmodel import Symbolic
 
Float       = Primitive("Float",       0.0)                  # C type 'double'
SingleFloat = Primitive("SingleFloat", r_singlefloat(0.0))   # C type 'float'
r_singlefloat._TYPE = SingleFloat
 
    elif ORIG == Float:
        if TGT == SingleFloat:
            return r_singlefloat(value)
        value = long(value)
    cast = _to_primitive.get(TGT)

src/s/y/Sypy-HEAD/rlib/rstruct/nativefmttable.py   Sypy(Download)
from pypy.rlib import jit, longlong2float
from pypy.rlib.objectmodel import specialize
from pypy.rlib.rarithmetic import r_singlefloat, widen
from pypy.rlib.rstruct import standardfmttable as std
from pypy.rlib.rstruct.error import StructError
def pack_float(fmtiter):
    doubleval = fmtiter.accept_float_arg()
    floatval = r_singlefloat(doubleval)
    value = longlong2float.singlefloat2uint(floatval)
    value = widen(value)

src/s/y/Sypy-HEAD/module/_ffi/type_converter.py   Sypy(Download)
    def _singlefloat(self, w_ffitype, w_obj):
        # a separate function, which can be seen by the jit or not,
        # depending on whether singlefloats are supported
        from pypy.rlib.rarithmetic import r_singlefloat
        floatval = self.space.float_w(w_obj)
        singlefloatval = r_singlefloat(floatval)

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/rpython/lltypesystem/ll2ctypes.py   plexnet(Download)
from pypy.tool.uid import fixid
from pypy.tool.tls import tlsobject
from pypy.rlib.rarithmetic import r_uint, r_singlefloat, intmask
from pypy.annotation import model as annmodel
from pypy.rpython.llinterp import LLInterpreter, LLException
        if isinstance(cobj, ctypes.c_float):
            cobj = cobj.value
        llobj = r_singlefloat(cobj)
    elif T is lltype.Void:
        llobj = cobj

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/rlib/rstruct/nativefmttable.py   plexnet(Download)
from pypy.rpython.tool import rffi_platform
from pypy.rpython.lltypesystem import lltype, rffi
from pypy.rlib.rarithmetic import r_singlefloat
from pypy.translator.tool.cbuild import ExternalCompilationInfo
from pypy.rlib.objectmodel import specialize
def pack_float(fmtiter):
    doubleval = fmtiter.accept_float_arg()
    floatval = r_singlefloat(doubleval)
    float_buf[0] = floatval
    p = rffi.cast(rffi.CCHARP, float_buf)

  1 | 2 | 3 | 4  Next