MCPcopy Create free account
hub / github.com/python/cpython / un_incr_digits

Function un_incr_digits

Modules/_decimal/tests/randdec.py:313–322  ·  view source on GitHub ↗
(prec, maxexp, itr)

Source from the content-addressed store, hash-verified

311
312# If itr == None, test all digit lengths up to prec + 30
313def un_incr_digits(prec, maxexp, itr):
314 if itr is None:
315 lst = range(prec+30)
316 else:
317 lst = sample(range(prec+30), itr)
318 for m in lst:
319 yield from_triple(1, ndigits(m), 0)
320 yield from_triple(-1, ndigits(m), 0)
321 yield from_triple(1, ndigits(m), randrange(maxexp))
322 yield from_triple(-1, ndigits(m), randrange(maxexp))
323
324# If itr == None, test all digit lengths up to prec + 30
325# Also output decimals im tuple form.

Callers

nothing calls this directly

Calls 3

sampleFunction · 0.85
from_tripleFunction · 0.85
ndigitsFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…