Created
December 23, 2016 22:16
-
-
Save Jamil/874fb73ae3448db26d9ca0424fa698ee to your computer and use it in GitHub Desktop.
XOR Shift pseudorandom number generator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pseudorand seed = (c * 2685821657736338717) .&. (2 ^ 64 - 1) | |
| where a = seed `xor` (seed `shiftR` 12) | |
| b = a `xor` (a `shiftL` 25) | |
| c = b `xor` (b `shiftR` 27) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment