/* Copyright (c) 1991 Regents of the University of California */ #ifndef lint static char SCCSid[] = "$SunId$ LBL"; #endif /* * Anticorrelated random function due to Christophe Schlick */ #include "random.h" #define NULL 0 extern char *malloc(); short *urperm; /* urand() permutation */ int urmask; /* bits used in permutation */ initurand(size) /* initialize urand() for size entries */ int size; { int order, n; register int i, offset; size--; for (i = 1; size >>= 1; i++) ; order = i; urmask = (1< 0) hval += *d++ * tab[n&7]; return(hval); }