MCPcopy Index your code
hub / github.com/python/cpython / _div3n2n

Function _div3n2n

Lib/_pylong.py:452–462  ·  view source on GitHub ↗

Helper function for _div2n1n; not intended to be called directly.

(a12, a3, b, b1, b2, n)

Source from the content-addressed store, hash-verified

450
451
452def _div3n2n(a12, a3, b, b1, b2, n):
453 """Helper function for _div2n1n; not intended to be called directly."""
454 if a12 >> n == b1:
455 q, r = (1 << n) - 1, a12 - (b1 << n) + b1
456 else:
457 q, r = _div2n1n(a12, b1, n)
458 r = (r << n | a3) - q * b2
459 while r < 0:
460 q -= 1
461 r += b
462 return q, r
463
464
465def _int2digits(a, n):

Callers 1

_div2n1nFunction · 0.85

Calls 1

_div2n1nFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…