Skip to content

A Marsaglia random number generator, of historical interest only

License

Notifications You must be signed in to change notification settings

raylee/xorshf96

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

xorshf96.c

This is a Marsaglia xorshift generator, implemented with a 3 x 32-bit pool, for a 2^96 period. At the time this hit a sweet spot for period vs speed.

Usage

Don't.

I put this up here only for historical purposes, as it used to be on my personal site from 2004. Nowadays a 2 x 64 bit xor shift generator has a longer period for fewer clock cycles. There are also many (arguably better) options than the xor-shift RNGs as well. The XOR Shift article at Wikipedia has a short discussion of tradeoffs about this class of generator.

About

A Marsaglia random number generator, of historical interest only

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages