Lines Matching refs:randrange
49 from random import randrange, sample
55 if randrange(2):
56 if randrange(2): return '+'
61 return "eE"[randrange(2)]
65 return str(randrange(10**maxprec))
68 if randrange(2): return '.'
72 if randrange(100) > 60: # integers
74 if randrange(2):
75 intlen = randrange(1, maxprec+1)
84 return str(randrange(maxexp))
90 if randrange(2): return 'Infinity'
95 if randrange(2):
96 d = digits(randrange(99))
97 if randrange(2):
103 if randrange(100) > 90:
106 if randrange(100) > 60:
111 if randrange(100) > 95:
123 exp = str(randrange(maxexp-2*(abs(maxexp)), maxexp))
129 return randrange(10**(n-1), 10**n)
132 n = randrange(100)
133 sign = randrange(2)
140 exp = "nN"[randrange(2)]
143 exp = randrange(-maxexp, maxexp)
161 yield from_triple(1, coeff, randrange(2*maxexp))
162 yield from_triple(-1, coeff, randrange(2*maxexp))
180 yield from_triple(1, coeff, randrange(2*maxexp)), 1
181 yield from_triple(-1, coeff, randrange(2*maxexp)), -1
182 yield 1, from_triple(1, coeff, -randrange(2*maxexp))
183 yield -1, from_triple(-1, coeff, -randrange(2*maxexp))
193 return ''.join(("1.", '0'*randrange(prec),
194 str(randrange(rprec))))
198 return ''.join(("0.9", '9'*randrange(prec),
199 str(randrange(rprec))))
204 return ''.join(("0.", '0'*randrange(prec),
205 str(randrange(rprec))))
209 return ''.join(("-0.", '0'*randrange(prec),
210 str(randrange(rprec))))
215 return ''.join(("9.", '9'*randrange(prec),
216 str(randrange(rprec)), "E", str(emax)))
220 return ''.join(("1.", '0'*randrange(prec),
221 str(randrange(rprec)), "E", str(emax+1)))
226 return ''.join(("1.", '0'*randrange(prec),
227 str(randrange(rprec)), "E", str(emin)))
231 return ''.join(("9.", '9'*randrange(prec),
232 str(randrange(rprec)), "E", str(emin-1)))
238 return ''.join(("1.", '0'*randrange(prec),
239 str(randrange(rprec)), "E", str(etiny)))
244 return ''.join(("9.", '9'*randrange(prec),
245 str(randrange(rprec)), "E", str(etiny-1)))
251 return ''.join(("1.", '0'*randrange(prec),
252 str(randrange(rprec)), "E", str(etiny)))
257 return ''.join(("9.", '9'*randrange(prec),
258 str(randrange(rprec)), "E", str(etiny-1)))
321 yield from_triple(1, ndigits(m), randrange(maxexp))
322 yield from_triple(-1, ndigits(m), randrange(maxexp))
334 yield from_triple(1, ndigits(m), randrange(maxexp))
335 yield from_triple(-1, ndigits(m), randrange(maxexp))
339 yield (0, tuple(map(int, str(ndigits(m)))), randrange(maxexp))
340 yield (1, tuple(map(int, str(ndigits(m)))), randrange(maxexp))
355 x = from_triple(1, ndigits(m), randrange(maxexp))
357 x = from_triple(-1, ndigits(m), randrange(maxexp))
373 x = from_triple(1, ndigits(m), randrange(maxexp))
374 y = from_triple(1, ndigits(n), randrange(maxexp))
376 x = from_triple(-1, ndigits(m), randrange(maxexp))
377 y = from_triple(1, ndigits(n), randrange(maxexp))
379 x = from_triple(1, ndigits(m), randrange(maxexp))
380 y = from_triple(-1, ndigits(n), randrange(maxexp))
382 x = from_triple(-1, ndigits(m), randrange(maxexp))
383 y = from_triple(-1, ndigits(n), randrange(maxexp))
388 return (1, -1)[randrange(2)]
413 z += randrange(2) * 10**i
442 p = randrange(1, 100)
443 return ndigits(p) * (1,-1)[randrange(2)]
446 p = randrange(1, 100)
456 if randrange(100) > 30: