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

Function tern_random_mixed_op

Modules/_decimal/tests/randdec.py:496–508  ·  view source on GitHub ↗
(prec, emax, emin, itr)

Source from the content-addressed store, hash-verified

494 yield x, y
495
496def tern_random_mixed_op(prec, emax, emin, itr):
497 if itr is None:
498 itr = 1000
499 for _ in range(itr):
500 for func in number_funcs:
501 yield randdec(prec, emax), randdec(prec, emax), func()
502 yield randdec(prec, emax), func(), func()
503 yield func(), func(), func()
504 # Test garbage input
505 for x in (['x'], ('y',), {'z'}, {1:'z'}):
506 for y in (['x'], ('y',), {'z'}, {1:'z'}):
507 for z in (['x'], ('y',), {'z'}, {1:'z'}):
508 yield x, y, z
509
510def all_unary(prec, exp_range, itr):
511 for a in un_close_to_pow10(prec, exp_range, itr):

Callers 1

all_ternaryFunction · 0.85

Calls 2

randdecFunction · 0.85
funcFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…