Lines Matching refs:lim
527 ** first compute 'lim', the smallest Mersenne number not smaller than
528 ** 'n'. We then project 'ran' into the interval [0, lim]. If the result
537 lua_Unsigned lim = n;
539 lim |= (lim >> 1);
540 lim |= (lim >> 2);
541 lim |= (lim >> 4);
542 lim |= (lim >> 8);
543 lim |= (lim >> 16);
545 lim |= (lim >> 32); /* integer type has more than 32 bits */
547 lua_assert((lim & (lim + 1)) == 0 /* 'lim + 1' is a power of 2, */
548 && lim >= n /* not smaller than 'n', */
549 && (lim >> 1) < n); /* and it is the smallest one */
550 while ((ran &= lim) > n) /* project 'ran' into [0..lim] */