MCPcopy Create free account
hub / github.com/cortex-js/compute-engine / mkSmall

Function mkSmall

benchmarks/big-decimal/ops-bench.py:27–29  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

25 return mpmath.mpf(s)
26
27def mkSmall(): # p-digit mpf in [0,2)
28 s = str(rng.randrange(2)) + '.' + ''.join(str(rng.randrange(10)) for _ in range(prec - 1))
29 return mpmath.mpf(s)
30
31poolA = [mkP() for _ in range(POOL)]
32poolB = [mkP() for _ in range(POOL)]

Callers 1

ops-bench.pyFile · 0.70

Calls 1

rangeFunction · 0.85

Tested by

no test coverage detected