Home
last modified time | relevance | path

Searched refs:divmod (Results 1 – 25 of 68) sorted by relevance

123

/third_party/python/Lib/test/
Dtest_fractions.py379 self.assertEqual((F(1), F(5, 6)), divmod(F(7, 3), F(3, 2)))
380 self.assertEqual((F(-2), F(2, 3)), divmod(F(-7, 3), F(3, 2)))
416 divmod(F(10**35+1, 10**27+1), F(10**27+1, 10**35-1))
428 divmod(F(5, 2**100), F(3, 2**100))
433 divmod(F(-2**100, 3), F(5, 2**100))
480 self.assertTypedTupleEquals((0, F(1, 10)), divmod(F(1, 10), 1))
481 self.assertTypedTupleEquals(divmod(0.1, 1.0), divmod(F(1, 10), 1.0))
482 self.assertTypedTupleEquals((10, F(0)), divmod(1, F(1, 10)))
483 self.assertTypedTupleEquals(divmod(1.0, 0.1), divmod(1.0, F(1, 10)))
484 self.assertTypedTupleEquals(divmod(0.1, float('inf')), divmod(F(1, 10), float('inf')))
[all …]
Dtest_strtod.py56 q, r = divmod(a, b)
156 e, m = divmod(bits, 2**52)
Dtest_bufio.py50 q, r = divmod(length, len(pattern))
Dtest_complex.py202 self.assertRaises(TypeError, divmod, 1+1j, 1+0j)
203 self.assertRaises(TypeError, divmod, 1+1j, 1.0)
204 self.assertRaises(TypeError, divmod, 1+1j, 1)
205 self.assertRaises(TypeError, divmod, 1.0, 1+0j)
206 self.assertRaises(TypeError, divmod, 1, 1+0j)
210 self.assertRaises(TypeError, divmod, a, b)
Dtest_abstract_numbers.py37 self.assertRaises(TypeError, divmod, c1, c2)
Dtest_binop.py177 return divmod(other, self)
181 return divmod(self, other)[1]
185 return divmod(other, self)[1]
Dtest_class.py216 divmod(testme,1)
220 divmod(1, testme)
Dtest_decimal.py905 self.assertEqual(divmod(E(), Decimal(10)), 'divmod 10')
906 self.assertEqual(divmod(Decimal(10), E()), '10 rdivmod')
1426 (p, q) = divmod(d1, d2)
1433 (p, q) = divmod(d1, 4)
1440 (p, q) = divmod(7, d1)
3093 d = c.divmod(Decimal(1), Decimal(2))
3094 self.assertEqual(c.divmod(1, 2), d)
3095 self.assertEqual(c.divmod(Decimal(1), 2), d)
3096 self.assertEqual(c.divmod(1, Decimal(2)), d)
3097 self.assertRaises(TypeError, c.divmod, '1', 2)
[all …]
/third_party/python/Lib/
Ddatetime.py112 n400, n = divmod(n, _DI400Y)
120 n100, n = divmod(n, _DI100Y)
123 n4, n = divmod(n, _DI4Y)
127 n1, n = divmod(n, 365)
190 hh, mm = divmod(off, timedelta(hours=1))
191 mm, ss = divmod(mm, timedelta(minutes=1))
233 h, rest = divmod(offset, timedelta(hours=1))
234 m, rest = divmod(rest, timedelta(minutes=1))
430 q, r = divmod(a, b)
513 days, seconds = divmod(seconds, 24*3600)
[all …]
Dfractions.py528 div, n_mod = divmod(a.numerator * db, da * b.numerator)
531 __divmod__, __rdivmod__ = _operator_fallbacks(_divmod, divmod)
618 floor, remainder = divmod(self.numerator, self.denominator)
D_pydecimal.py1366 coeff, remainder = divmod(op1.int * 10**shift, op2.int)
1368 coeff, remainder = divmod(op1.int, op2.int * 10**-shift)
1406 q, r = divmod(op1.int, op2.int)
1555 q, r = divmod(op1.int, op2.int)
2196 xc, remainder = divmod(5**e, xc)
2249 xe, rem = divmod(xe, n)
2256 q, r = divmod(xc, a**(n-1))
2779 c, remainder = divmod(c, 100**-shift)
4418 def divmod(self, a, b): member in Context
5721 q, r = divmod(a, b)
[all …]
/third_party/boost/libs/hana/example/functional/
Dinfix.cpp13 BOOST_HANA_CONSTEXPR_LAMBDA auto divmod = hana::infix([](auto x, auto y) { in __anon70674d260102() variable
19 BOOST_HANA_CONSTEXPR_CHECK((42 ^divmod^ 23) == hana::make_pair(1, 19)); in main()
/third_party/python/Lib/test/libregrtest/
Dutils.py10 seconds, ms = divmod(ms, 1000)
11 minutes, seconds = divmod(seconds, 60)
12 hours, minutes = divmod(minutes, 60)
/third_party/python/Lib/email/
Dbase64mime.py52 groups_of_3, leftover = divmod(len(bytearray), 3)
D_encoded_words.py142 groups_of_3, leftover = divmod(len(bstring), 3)
/third_party/python/Lib/unittest/test/testmock/
Dtestmagicmethods.py480 self.assertIsInstance(divmod(5, m), MagicMock)
482 self.assertEqual(divmod(m, 2), (2, 1))
484 foo = divmod(2, m)
488 bar = divmod(m, 2)
/third_party/python/Modules/_decimal/libmpdec/literature/
Dfnt.py70 q, control = divmod(p-1, f)
Dmulmod-64.txt65 return divmod(hi * z - hi + lo, 2**64)
/third_party/mindspore/tests/ut/python/pipeline/parse/
Dtest_use_undefined_name_or_unsupported_builtin_function.py342 ret = divmod(x, y)
364 x = divmod(x, i)
/third_party/mindspore/tests/ut/python/fallback/
Dtest_graph_fallback.py85 a = divmod(x, y)
/third_party/python/Modules/
D_datetimemodule.c165 divmod(int x, int y, int *r) in divmod() function
485 const int num_hi = divmod(*lo, factor, lo); in normalize_pair()
1396 minutes = divmod(seconds, 60, &seconds); in format_utcoffset()
1397 hours = divmod(minutes, 60, &minutes); in format_utcoffset()
2288 PyObject *divmod; in delta_divmod() local
2305 divmod = checked_divmod(pyus_left, pyus_right); in delta_divmod()
2308 if (divmod == NULL) in delta_divmod()
2311 delta = microseconds_to_delta(PyTuple_GET_ITEM(divmod, 1)); in delta_divmod()
2313 Py_DECREF(divmod); in delta_divmod()
2316 result = PyTuple_Pack(2, PyTuple_GET_ITEM(divmod, 0), delta); in delta_divmod()
[all …]
/third_party/boost/tools/build/test/
Dcore_nt_cmd_line.py32 x, n = divmod(n, 10 ** i)
/third_party/python/Modules/_decimal/tests/
Drandfloat.py62 e, m = divmod(bits, 2**52)
/third_party/mindspore/mindspore/numpy/
D__init__.py69 divmod = divmod_ # pylint: disable=redefined-builtin variable
/third_party/python/Doc/c-api/
Dnumber.rst67 .. index:: builtin: divmod
69 See the built-in function :func:`divmod`. Returns ``NULL`` on failure. This is
70 the equivalent of the Python expression ``divmod(o1, o2)``.

123