6 /* Simple Park-Miller */
8 static unsigned long seed
= 29264;
11 fast_srandom(unsigned long seed_
)
17 fast_random(unsigned int max
)
20 lo
= 16807 * (seed
& 0xffff);
21 hi
= 16807 * (seed
>> 16);
22 lo
+= (hi
& 0x7fff) << 16;
24 seed
= (lo
& 0x7fffffff) + (lo
>> 31);
25 return ((seed
& 0xffff) * max
) >> 16;