![]() | ![]() | IFSgr Library Reference Manual | ![]() |
---|
taus — Tausworthe random generator.
#define IFS_TAUS_MASK void ifs_taus_seed (void); unsigned long ifs_taus_get (void);
The Tausworthe pseudorandom number generator (maximally equidistributed combined, collision free, with a period about 2113) is intended mainly for IFSgr itself, however you can use it too if random() is not good enough for you.
Before first use the generator has to be seeded with ifs_taus_seed(), pseudorandom numbers can be then obtained from ifs_taus_get().
#define IFS_TAUS_MASK 0xffffffffUL
The maximum value ifs_taus_get() can return, and a bit mask for numbers ifs_taus_get() can return at the same time.
void ifs_taus_seed (void);
Seed the Tausworthe random generator from /dev/urandom (or what was defined as randomness source when IFSgr was compiled). On failure 1 is used as the default seed.
<< ifsc | ifsgr >> |