• Home
  • Raw
  • Download

Lines Matching full:max

44 	int max;  member
54 * min:max[:mult]
56 * any of the values may be blank (ie. min::mult, :max, etc.) and default
62 * which is malloc'd by the routine. The min, max, and mult entries of each
72 * defmax default value to plug in for max, if it is missing
75 * can call to parse the min, max, and mult strings. This
134 rp->max = defmax; in parse_ranges()
165 * Process the 'max' field - if one was not present (n1 format) in parse_ranges()
166 * set max equal to min. If the field was present, but in parse_ranges()
172 rp->max = rp->min; in parse_ranges()
174 if ((*parse_func) (n2str, &rp->max) < 0) { in parse_ranges()
233 * Three simple functions to return the min, max, and mult values for a given
245 return ((struct range *)rbuf)[r].max; in range_max()
278 long random_range(int min, int max, int mult, char **errp) in random_range() argument
301 orig_max = max; in random_range()
305 * switch min/max if max < min in random_range()
308 if (max < min) { in random_range()
309 tmp = max; in random_range()
310 max = min; in random_range()
321 if ((r = max % mult)) /* reduce to the next lower 'mult' multiple */ in random_range()
322 max -= r; in random_range()
324 if (min > max) { /* no 'mult' multiples between min & max */ in random_range()
338 nmults = ((max - min) / mult) + 1; in random_range()
341 * If max is less than 2gb, then the value can fit in 32 bits in random_range()
344 if (max <= (long)2147483647) { in random_range()
348 * max is greater than 2gb - meeds more than 32 bits. in random_range()
352 randnum = divider(min, max, 0, -1); in random_range()
365 long random_rangel(long min, long max, long mult, char **errp) in random_rangel() argument
388 orig_max = max; in random_rangel()
392 * switch min/max if max < min in random_rangel()
395 if (max < min) { in random_rangel()
396 tmp = max; in random_rangel()
397 max = min; in random_rangel()
408 if ((r = max % mult)) /* reduce to the next lower 'mult' multiple */ in random_rangel()
409 max -= r; in random_rangel()
411 if (min > max) { /* no 'mult' multiples between min & max */ in random_rangel()
425 nmults = ((max - min) / mult) + 1; in random_rangel()
428 * If max is less than 2gb, then the value can fit in 32 bits in random_rangel()
431 if (max <= (long)2147483647) { in random_rangel()
435 * max is greater than 2gb - meeds more than 32 bits. in random_rangel()
439 randnum = divider(min, max, 0, -1); in random_rangel()
451 long long random_rangell(long long min, long long max, in random_rangell() argument
476 orig_max = max; in random_rangell()
480 * switch min/max if max < min in random_rangell()
483 if (max < min) { in random_rangell()
484 tmp = max; in random_rangell()
485 max = min; in random_rangell()
496 if ((r = max % mult)) /* reduce to the next lower 'mult' multiple */ in random_rangell()
497 max -= r; in random_rangell()
499 if (min > max) { /* no 'mult' multiples between min & max */ in random_rangell()
513 nmults = ((max - min) / mult) + 1; in random_rangell()
515 * If max is less than 2gb, then the value can fit in 32 bits in random_rangell()
518 if (max <= (long)2147483647) { in random_rangell()
523 * max is greater than 2gb - meeds more than 32 bits. in random_rangell()
526 randnum = divider(min, max, 0, -1); in random_rangell()
534 * number min and max. It was designed to work the 64bit numbers
537 * find the difference between min and max (max-min).
539 * Determine the midway point between min and max.
540 * if the midway point is less than 2g from min or max,
543 * Otherwise, call outself with min and max being min and midway value or
544 * midway value and max. This will reduce the range in half.
547 divider(long long min, long long max, long long cnt, long long rand) in divider() argument
566 diff = max - min; in divider()
571 half = diff / (long long)2; /* half the distance between min and max */ in divider()
572 med = min + half; /* med way point between min and max */ in divider()
575 printf("divider: min=%lld, max=%lld, cnt=%lld, rand=%lld\n", min, max, in divider()
583 * to pick the number within the min to med or med to max in divider()
596 return divider(med, max, cnt + 1, rand); in divider()
805 printf(" min=%ld, max=%ld\n", ltmin, ltmax);
845 printf(" min=%lld, max=%lld\n", lltmin, lltmax);
885 printf(" min=%d, max=%d\n", itmin, itmax);