Home
last modified time | relevance | path

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

1234567

/external/python/cpython3/Lib/test/
Dtest_fractions.py377 self.assertEqual((F(1), F(5, 6)), divmod(F(7, 3), F(3, 2)))
378 self.assertEqual((F(-2), F(2, 3)), divmod(F(-7, 3), F(3, 2)))
414 divmod(F(10**35+1, 10**27+1), F(10**27+1, 10**35-1))
426 divmod(F(5, 2**100), F(3, 2**100))
431 divmod(F(-2**100, 3), F(5, 2**100))
478 self.assertTypedTupleEquals((0, F(1, 10)), divmod(F(1, 10), 1))
479 self.assertTypedTupleEquals(divmod(0.1, 1.0), divmod(F(1, 10), 1.0))
480 self.assertTypedTupleEquals((10, F(0)), divmod(1, F(1, 10)))
481 self.assertTypedTupleEquals(divmod(1.0, 0.1), divmod(1.0, F(1, 10)))
482 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.py49 q, r = divmod(length, len(pattern))
Dtest_abstract_numbers.py37 self.assertRaises(TypeError, divmod, c1, c2)
/external/python/cpython3/Lib/test/libregrtest/
Dutils.py10 seconds, ms = divmod(ms, 1000)
11 minutes, seconds = divmod(seconds, 60)
12 hours, minutes = divmod(minutes, 60)
/external/python/cpython3/Lib/
Ddatetime.py111 n400, n = divmod(n, _DI400Y)
119 n100, n = divmod(n, _DI100Y)
122 n4, n = divmod(n, _DI4Y)
126 n1, n = divmod(n, 365)
189 hh, mm = divmod(off, timedelta(hours=1))
190 mm, ss = divmod(mm, timedelta(minutes=1))
232 h, rest = divmod(offset, timedelta(hours=1))
233 m, rest = divmod(rest, timedelta(minutes=1))
461 q, r = divmod(a, b)
544 days, seconds = divmod(seconds, 24*3600)
[all …]
Dfractions.py421 div, n_mod = divmod(a.numerator * db, da * b.numerator)
424 __divmod__, __rdivmod__ = _operator_fallbacks(_divmod, divmod)
511 floor, remainder = divmod(self.numerator, self.denominator)
/external/python/cpython2/Lib/
Drandom.py685 a, x = divmod(a, 30268)
686 a, y = divmod(a, 30306)
687 a, z = divmod(a, 30322)
774 t, x = divmod(t, 256)
775 t, y = divmod(t, 256)
776 t, z = divmod(t, 256)
797 a, x = divmod(a, 256)
798 a, y = divmod(a, 256)
799 a, z = divmod(a, 256)
Dbase64.py148 quanta, leftover = divmod(len(s), 5)
203 quanta, leftover = divmod(len(s), 8)
/external/python/cpython2/Lib/test/
Dtest_builtin.py330 self.assertEqual(divmod(12, 7), (1, 5))
331 self.assertEqual(divmod(-12, 7), (-2, 2))
332 self.assertEqual(divmod(12, -7), (-2, -2))
333 self.assertEqual(divmod(-12, -7), (1, -5))
335 self.assertEqual(divmod(12L, 7L), (1L, 5L))
336 self.assertEqual(divmod(-12L, 7L), (-2L, 2L))
337 self.assertEqual(divmod(12L, -7L), (-2L, -2L))
338 self.assertEqual(divmod(-12L, -7L), (1L, -5L))
340 self.assertEqual(divmod(12, 7L), (1, 5L))
341 self.assertEqual(divmod(-12, 7L), (-2, 2L))
[all …]
Dtest_binop.py186 return divmod(other, self)
190 return divmod(self, other)[1]
194 return divmod(other, self)[1]
Dtest_strtod.py57 q, r = divmod(a, b)
157 e, m = divmod(bits, 2**52)
Dtest_bufio.py49 q, r = divmod(length, len(pattern))
/external/python/dateutil/dateutil/
Drrule.py853 daypos, timepos = divmod(pos, len(timeset))
855 daypos, timepos = divmod(pos-1, len(timeset))
910 div, mod = divmod(month, 12)
940 ndays, hour = divmod(hour+interval, 24)
961 nhours, minute = divmod(minute+interval, 60)
963 div, hour = divmod(hour+nhours, 24)
993 nminutes, second = divmod(second+interval, 60)
995 div, minute = divmod(minute+nminutes, 60)
998 div, hour = divmod(hour, 24)
1070 if i_gcd == 1 or divmod(num - start, i_gcd)[1] == 0:
[all …]
Drelativedelta.py234 div, mod = divmod(self.microseconds * s, 1000000)
239 div, mod = divmod(self.seconds * s, 60)
244 div, mod = divmod(self.minutes * s, 60)
249 div, mod = divmod(self.hours * s, 24)
254 div, mod = divmod(self.months * s, 12)
276 div, mod = divmod(self.months * s, 12)
/external/bc/tests/dc/
Dall.txt8 divmod
/external/clang/utils/
DFuzzTest46 index,picked_position = divmod(index, self.num_positions)
53 index,position = divmod(index, self.num_positions)
60 index,insert_index = divmod(index, self.num_insert_strings)
/external/llvm-project/clang/utils/
DFuzzTest46 index,picked_position = divmod(index, self.num_positions)
53 index,position = divmod(index, self.num_positions)
60 index,insert_index = divmod(index, self.num_insert_strings)
/external/python/rsa/rsa/
Drandnum.py32 nbytes, rbits = divmod(nbits, 8)
/external/autotest/client/cros/audio/
Dsox_utils.py322 mins, secs = divmod(new_duration, 60)
323 hrs, mins = divmod(mins, 60)
/external/python/cpython3/Lib/email/
Dbase64mime.py52 groups_of_3, leftover = divmod(len(bytearray), 3)
/external/python/cpython3/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)
/external/python/mock/mock/tests/
Dtestmagicmethods.py524 self.assertIsInstance(divmod(5, m), MagicMock)
526 self.assertEqual(divmod(m, 2), (2, 1))
528 foo = divmod(2, m)
532 bar = divmod(m, 2)
/external/python/cryptography/src/cryptography/hazmat/primitives/asymmetric/
Drsa.py190 q, r = divmod(a, b)
262 q, r = divmod(n, p)
/external/python/cpython2/Lib/email/
Dbase64mime.py54 groups_of_3, leftover = divmod(len(s), 3)

1234567