Some C programs and subroutines

mersenne_inline.c and mersenne.h
These are an implementation of the Twisted Mersenne random number generator. You need these for almost all of the other programs

Just generates and prints random numbers. Uses the Mersenne generator from above.

Implements the Box-Muller method for generating Gaussian random numbers.

Prints Gaussian random numbers.

Does a simple Monte Carlo integration.

2-d Ising model heat bath update program. Needs mersenne.h and mersenne_inline.c.

errors.c and cmdline.c
A general-purpose program for analysing errors with autocorrelations of simulation data written in a file. Needs both errors.c and cmdline.c above. Instructions for use are written in file errors.c. Compile (in unix/linux) with
cc -o errors errors.c cmdline.c -lm

Monte Carlo program for interacting Coulomb particles, "ions". Requires mersenne_inline.c, mersenne.h, gaussian_ran.c and cmdline.c. This can use grace-plotting program for animations, if available (requires X11). This is included if GRACE is defined in ions.c. Compile with
cc -O2 -o ions ions.c gaussian_ran.c mersenne_inline.c cmdline.c -lm -lgrace_np
where the last library (-lgrace_np) is used only if grace support is compiled in.

X-windows demo program for 2d Ising model. Needs mersenne.h and mersenne_inline.c This is modified from the "xtoys" programs of Michael Creutz, Brookhaven,