Home
last modified time | relevance | path

Searched refs:divmod (Results 1 - 25 of 49) sorted by relevance

12

/third_party/python/Lib/test/
H A Dtest_fractions.py484 self.assertEqual((F(1), F(5, 6)), divmod(F(7, 3), F(3, 2)))
485 self.assertEqual((F(-2), F(2, 3)), divmod(F(-7, 3), F(3, 2)))
521 divmod(F(10**35+1, 10**27+1), F(10**27+1, 10**35-1))
533 divmod(F(5, 2**100), F(3, 2**100))
538 divmod(F(-2**100, 3), F(5, 2**100))
585 self.assertTypedTupleEquals((0, F(1, 10)), divmod(F(1, 10), 1))
586 self.assertTypedTupleEquals(divmod(0.1, 1.0), divmod(F(1, 10), 1.0))
587 self.assertTypedTupleEquals((10, F(0)), divmod(1, F(1, 10)))
588 self.assertTypedTupleEquals(divmod(1.
[all...]
H A Dtest_binop.py177 return divmod(other, self)
181 return divmod(self, other)[1]
185 return divmod(other, self)[1]
300 # XXX Ran out of steam; TO DO: divmod, div, future division
H A Dtest_abstract_numbers.py37 self.assertRaises(TypeError, divmod, c1, c2)
H A Dtest_bufio.py50 q, r = divmod(length, len(pattern))
H A Dtest_strtod.py56 q, r = divmod(a, b)
156 e, m = divmod(bits, 2**52)
H A 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)
H A Dtest_long.py104 q, r = divmod(a, b)
158 q, r = divmod(x, y)
162 eq(q, q2, "divmod returns different quotient than /")
163 eq(r, r2, "divmod returns different mod than %")
164 eq(x, q*y + r, "x != q*y + r after divmod")
166 self.assertTrue(0 <= r < y, "bad mod from divmod")
168 self.assertTrue(y < r <= 0, "bad mod from divmod")
299 x, r = divmod(x, base)
1057 q, r = divmod(2 * big + 3, big)
1061 q, r = divmod(
[all...]
H A Dtest_class.py23 "divmod",
216 divmod(testme,1)
220 divmod(1, testme)
H A Dtest_time.py965 return divmod(us, SEC_TO_US)
987 return divmod(ns, SEC_TO_NS)
1012 tv_sec, tv_usec = divmod(us, SEC_TO_US)
1028 tv_sec, tv_nsec = divmod(t, NS_TO_SEC)
H A Dtest_decimal.py879 return 'divmod ' + str(other)
895 self.assertEqual(divmod(E(), Decimal(10)), 'divmod 10')
896 self.assertEqual(divmod(Decimal(10), E()), '10 rdivmod')
1476 (p, q) = divmod(d1, d2)
1483 (p, q) = divmod(d1, 4)
1490 (p, q) = divmod(7, d1)
3161 d = c.divmod(Decimal(1), Decimal(2))
3162 self.assertEqual(c.divmod(1, 2), d)
3163 self.assertEqual(c.divmod(Decima
[all...]
/third_party/python/Lib/
H A 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))
561 q, r = divmod(a, b)
644 days, seconds = divmod(second
[all...]
H A Dfractions.py529 div, n_mod = divmod(a.numerator * db, da * b.numerator)
532 __divmod__, __rdivmod__ = _operator_fallbacks(_divmod, divmod)
626 floor, remainder = divmod(self.numerator, self.denominator)
H A Dtarfile.py250 blocks, remainder = divmod(length, bufsize)
515 blocks, remainder = divmod(pos - self.pos, self.bufsize)
1147 blocks, remainder = divmod(len(payload), BLOCKSIZE)
1592 blocks, remainder = divmod(count, BLOCKSIZE)
1992 blocks, remainder = divmod(self.offset, RECORDSIZE)
2231 blocks, remainder = divmod(tarinfo.size, BLOCKSIZE)
H A D_pydecimal.py1376 coeff, remainder = divmod(op1.int * 10**shift, op2.int)
1378 coeff, remainder = divmod(op1.int, op2.int * 10**-shift)
1416 q, r = divmod(op1.int, op2.int)
1423 'quotient too large in //, % or divmod')
1451 ans = context._raise_error(InvalidOperation, 'divmod(INF, INF)')
1459 ans = context._raise_error(DivisionUndefined, 'divmod(0, 0)')
1565 q, r = divmod(op1.int, op2.int)
2206 xc, remainder = divmod(5**e, xc)
2259 xe, rem = divmod(xe, n)
2266 q, r = divmod(x
4432 def divmod(self, a, b): global() member in Context
[all...]
/third_party/python/Lib/test/libregrtest/
H A Dutils.py10 seconds, ms = divmod(ms, 1000)
11 minutes, seconds = divmod(seconds, 60)
12 hours, minutes = divmod(minutes, 60)
H A Dmain.py166 mins, secs = divmod(int(test_time), 60)
167 hours, mins = divmod(mins, 60)
/third_party/mbedtls/scripts/mbedtls_dev/
H A Dbignum_core.py175 carry, result = divmod(result, self.limb_boundary)
259 carry_4, remainder_4 = divmod(result, bound_4)
260 carry_8, remainder_8 = divmod(result, bound_8)
876 borrow, result = divmod(result, self.limb_boundary)
/third_party/python/Lib/unittest/test/testmock/
H A 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/Lib/email/
H A Dbase64mime.py53 groups_of_3, leftover = divmod(len(bytearray), 3)
H A D_encoded_words.py142 groups_of_3, leftover = divmod(len(bstring), 3)
/third_party/vixl/tools/
H A Dprinter.py110 minutes, seconds = divmod(time.time() - start_time, 60)
/third_party/python/Modules/_decimal/libmpdec/literature/
H A Dfnt.py70 q, control = divmod(p-1, f)
/third_party/python/Modules/
H A D_datetimemodule.c160 /* Compute Python divmod(x, y), returning the quotient and storing the
166 * the overflow case impossible (divmod(LONG_MIN, -1) is the only
170 divmod(int x, int y, int *r) in divmod() function
523 const int num_hi = divmod(*lo, factor, lo); in normalize_pair()
1493 minutes = divmod(seconds, 60, &seconds); in format_utcoffset()
1494 hours = divmod(minutes, 60, &minutes); in format_utcoffset()
1902 "divmod() returned non-tuple (type %.200s)", in checked_divmod()
1909 "divmod() returned a tuple of size %zd", in checked_divmod()
1980 "divmod() returned a value out of range"); in microseconds_to_delta_ex()
2385 PyObject *divmod; in delta_divmod() local
[all...]
/third_party/python/Modules/_decimal/tests/
H A Drandfloat.py62 e, m = divmod(bits, 2**52)
/third_party/python/Lib/turtledemo/
H A Dnim.py105 packet, remainder = divmod(col, 5)

Completed in 32 milliseconds

12