Skip to content

Instantly share code, notes, and snippets.

@kuboon
Created May 8, 2023 06:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kuboon/c5b8f60044de747015fe8df446bb862e to your computer and use it in GitHub Desktop.
Save kuboon/c5b8f60044de747015fe8df446bb862e to your computer and use it in GitHub Desktop.
xorshift32 for Excel / google sheets # replace "input" to A1 or anything
=LET(LX, LAMBDA(X, A, BITXOR(X, BITLSHIFT(BITAND(X, 2^(32-A)-1), A))), RX, LAMBDA(X, A, BITXOR(X, BITRSHIFT(X, A))), LX(RX(LX(input, 13), 17), 5))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment