(prec, maxexp, itr)
| 324 | # If itr == None, test all digit lengths up to prec + 30 |
| 325 | # Also output decimals im tuple form. |
| 326 | def un_incr_digits_tuple(prec, maxexp, itr): |
| 327 | if itr is None: |
| 328 | lst = range(prec+30) |
| 329 | else: |
| 330 | lst = sample(range(prec+30), itr) |
| 331 | for m in lst: |
| 332 | yield from_triple(1, ndigits(m), 0) |
| 333 | yield from_triple(-1, ndigits(m), 0) |
| 334 | yield from_triple(1, ndigits(m), randrange(maxexp)) |
| 335 | yield from_triple(-1, ndigits(m), randrange(maxexp)) |
| 336 | # test from tuple |
| 337 | yield (0, tuple(map(int, str(ndigits(m)))), 0) |
| 338 | yield (1, tuple(map(int, str(ndigits(m)))), 0) |
| 339 | yield (0, tuple(map(int, str(ndigits(m)))), randrange(maxexp)) |
| 340 | yield (1, tuple(map(int, str(ndigits(m)))), randrange(maxexp)) |
| 341 | |
| 342 | # If itr == None, test all combinations of digit lengths up to prec + 30 |
| 343 | def bin_incr_digits(prec, maxexp, itr): |
no test coverage detected
searching dependent graphs…