Did I find the right examples for you? yes no

All Samples(3)  |  Call(0)  |  Derive(0)  |  Import(3)

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):
    if e == bias + 2:
        if mantissa == 0.5:
            number = INFINITY
        else:
            return NAN

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/rlib/test/test_objectmodel.py   plexnet(Download)
def test_compute_hash_float():
    from pypy.rlib.rarithmetic import INFINITY, NAN
    assert compute_hash(INFINITY) == 314159
    assert compute_hash(-INFINITY) == -271828
    assert compute_hash(NAN) == 0
            q = Foo()
            assert compute_hash(q) == compute_identity_hash(q)
            from pypy.rlib.rarithmetic import INFINITY, NAN
            assert compute_hash(INFINITY) == 314159
            assert compute_hash(-INFINITY) == -271828