def all_ternary(prec, exp_range, itr): for a, b, c in tern_close_numbers(prec, exp_range, -exp_range, itr): yield a, b, c for a, b, c in tern_incr_digits(prec, exp_range, itr): yield a, b, c for a, b, c in tern_randfloat(): yield a, b, c for a, b, c in tern_random_mixed_op(prec, exp_range, -exp_range, itr): yield a, b, c for _ in range(100): a = randdec(prec, 2*exp_range) b = randdec(prec, 2*exp_range) c = randdec(prec, 2*exp_range) yield a, b, c