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

Function numeric_value

Modules/_decimal/tests/randdec.py:102–108  ·  view source on GitHub ↗
(maxprec, maxexp)

Source from the content-addressed store, hash-verified

100 return ''.join(('sNaN', d))
101
102def numeric_value(maxprec, maxexp):
103 if randrange(100) > 90:
104 return infinity()
105 exp_part = ''
106 if randrange(100) > 60:
107 exp_part = exponent_part(maxexp)
108 return ''.join((decimal_part(maxprec), exp_part))
109
110def numeric_string(maxprec, maxexp):
111 if randrange(100) > 95:

Callers 2

numeric_stringFunction · 0.85
randfloatFunction · 0.85

Calls 4

infinityFunction · 0.85
exponent_partFunction · 0.85
decimal_partFunction · 0.85
joinMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…