Searched refs:_PyHASH_MODULUS (Results 1 – 8 of 8) sorted by relevance
/third_party/python/Modules/_decimal/tests/ |
D | bignum.py | 12 _PyHASH_MODULUS = sys.hash_info.modulus variable 18 _PyHASH_10INV = pow(10, _PyHASH_MODULUS - 2, _PyHASH_MODULUS) 26 exp_hash = pow(10, exp, _PyHASH_MODULUS) 28 exp_hash = pow(_PyHASH_10INV, -exp, _PyHASH_MODULUS) 29 hash_ = coeff * exp_hash % _PyHASH_MODULUS
|
/third_party/python/Lib/test/ |
D | test_numeric_tower.py | 14 _PyHASH_MODULUS = sys.hash_info.modulus variable 119 self.assertEqual(hash(F(1, _PyHASH_MODULUS)), _PyHASH_INF) 120 self.assertEqual(hash(F(-1, 3*_PyHASH_MODULUS)), -_PyHASH_INF) 121 self.assertEqual(hash(F(7*_PyHASH_MODULUS, 1)), 0) 122 self.assertEqual(hash(F(-_PyHASH_MODULUS, 1)), 0)
|
/third_party/python/Python/ |
D | pyhash.c | 117 x = ((x << 28) & _PyHASH_MODULUS) | x >> (_PyHASH_BITS - 28); in _Py_HashDouble() 123 if (x >= _PyHASH_MODULUS) in _Py_HashDouble() 124 x -= _PyHASH_MODULUS; in _Py_HashDouble() 129 x = ((x << e) & _PyHASH_MODULUS) | x >> (_PyHASH_BITS - e); in _Py_HashDouble()
|
D | sysmodule.c | 1405 PyLong_FromSsize_t(_PyHASH_MODULUS)); in get_hash_info()
|
/third_party/python/Include/ |
D | pyhash.h | 30 #define _PyHASH_MODULUS (((size_t)1 << _PyHASH_BITS) - 1) macro
|
/third_party/python/Lib/ |
D | fractions.py | 18 _PyHASH_MODULUS = sys.hash_info.modulus variable 646 dinv = pow(self._denominator, -1, _PyHASH_MODULUS)
|
D | _pydecimal.py | 962 exp_hash = pow(10, self._exp, _PyHASH_MODULUS) 964 exp_hash = pow(_PyHASH_10INV, -self._exp, _PyHASH_MODULUS) 965 hash_ = int(self._int) * exp_hash % _PyHASH_MODULUS 6403 _PyHASH_MODULUS = sys.hash_info.modulus variable 6409 _PyHASH_10INV = pow(10, _PyHASH_MODULUS - 2, _PyHASH_MODULUS)
|
/third_party/python/Objects/ |
D | longobject.c | 2960 x = ((x << PyLong_SHIFT) & _PyHASH_MODULUS) | in long_hash() 2963 if (x >= _PyHASH_MODULUS) in long_hash() 2964 x -= _PyHASH_MODULUS; in long_hash()
|