Lines Matching refs:random
4 import random
116 # Select a random odd n in [2**53/5**k,
119 n, e = random.randrange(lower, upper, 2), k
152 # bit pattern for a random finite positive (or +0.0) float
153 bits = random.randrange(2047*2**52)
187 digits = n + random.randrange(-3*u, 3*u)
197 # to boundary_tests, except that the random error doesn't scale
202 digits = base + random.randrange(-1000, 1000)
210 digits = random.randrange(dig10)
211 exponent = random.randrange(-400, 400)
220 # put together random short valid strings
224 s = random.choice(signs)
225 intpart_len = random.randrange(5)
226 s += ''.join(random.choice(digits) for _ in range(intpart_len))
227 if random.choice([True, False]):
229 fracpart_len = random.randrange(5)
230 s += ''.join(random.choice(digits)
234 if random.choice([True, False]):
235 s += random.choice(['e', 'E'])
236 s += random.choice(signs)
237 exponent_len = random.randrange(1, 4)
238 s += ''.join(random.choice(digits)