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

Function test_underflow_boundary

Modules/_decimal/tests/randfloat.py:102–111  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

100 e -= 1
101
102def test_underflow_boundary():
103 # test values close to 2**-1075, the underflow boundary; similar
104 # to boundary_tests, except that the random error doesn't scale
105 # with n
106 for exponent in range(-400, -320):
107 base = 10**-exponent // 2**1075
108 for j in range(TEST_SIZE):
109 digits = base + random.randrange(-1000, 1000)
110 s = '{}e{}'.format(digits, exponent)
111 yield s
112
113def test_bigcomp():
114 for ndigs in 5, 10, 14, 15, 16, 17, 18, 19, 20, 40, 41, 50:

Callers 1

randfloat.pyFile · 0.85

Calls 2

randrangeMethod · 0.80
formatMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…