1 /*	Last revised 28-1-1999	*/
2 /*	This is the header file FastNorm3.h to be included in code files
3 	using FastNorm3.c	*/
4 /*	                      I M P O R T A N T   ! ! ! ! !
5 
6 	The definition below should be altered to ensure that integer
7 arithmetic is done on 32-bit words. It may need to be changed from int to
8 long on some platforms.  The 32-bit requirement arises from the use of
9 a Uniform pseudo-random generator in part of the code, which assumes 32-bit
10 twos-complement arithmetic.  In dire need, replace this generator with
11 another more suitable for the platform. The rest of the code assumes only
12 that signed integers up to a bit less than 2^31 can be handled.
13 	*/
14 
15 #define Sw int		/* MUST define Sw as a 32-bit integer or longer */
16 #define Sf double
17 
18 extern int gaussfaze;
19 extern int gaussmask;
20 extern double *gausssave;
21 extern double GScale;
22 
23 #define FastNorm ((--gaussfaze)?GScale*gausssave[gaussfaze]:fastnorm())
24 
25 void initnorm(Sw seed, Sw quoll);
26 Sf fastnorm (void);
27 Sf c7rand(Sw*);
28 Sw irandm(Sw*);
29 unsigned Sw urandm(Sw*);
30 double adchi (double a, int *is);
31 double rgamma (double g, int *is);
32 Sf renormalize(void);
33