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

Function all_ternary

Modules/_decimal/tests/randdec.py:554–567  ·  view source on GitHub ↗
(prec, exp_range, itr)

Source from the content-addressed store, hash-verified

552 yield randdec(prec, exp_range), randdec(prec, exp_range), None, None
553
554def all_ternary(prec, exp_range, itr):
555 for a, b, c in tern_close_numbers(prec, exp_range, -exp_range, itr):
556 yield a, b, c
557 for a, b, c in tern_incr_digits(prec, exp_range, itr):
558 yield a, b, c
559 for a, b, c in tern_randfloat():
560 yield a, b, c
561 for a, b, c in tern_random_mixed_op(prec, exp_range, -exp_range, itr):
562 yield a, b, c
563 for _ in range(100):
564 a = randdec(prec, 2*exp_range)
565 b = randdec(prec, 2*exp_range)
566 c = randdec(prec, 2*exp_range)
567 yield a, b, c
568
569def ternary_optarg(prec, exp_range, itr):
570 for _ in range(100):

Callers 1

test_ternaryFunction · 0.90

Calls 5

tern_randfloatFunction · 0.90
tern_close_numbersFunction · 0.85
tern_incr_digitsFunction · 0.85
tern_random_mixed_opFunction · 0.85
randdecFunction · 0.85

Tested by 1

test_ternaryFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…