MSCW 3CW "08 March 2008" "mathcw-1.00"

Table of contents


NAME

mscw, lmscw, llmscw - make a unique seed for a random-number generator

SYNOPSIS

cc [ flags ] -I/usr/local/include file(s) -L/usr/local/lib -lmcw [ ... ]

#include <mathcw.h>

extern int mscw (void);

extern long int lmscw (void);

extern long long int llmscw (void);


DESCRIPTION

Make a unique seed for a random-number generator, using a mixture of data from a constant, a counter incremented and shifted on each call, the time since the epoch, and the process ID. Each call, and each family member, produces a distinct seed.

RETURN VALUES

Return the seed.

ERRORS

None.

SEE ALSO

ercw(3CW), lrcw(3CW), nrcw(3CW), randcw(3CW).