Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wichmann-Hill pseudo random #14

Merged
merged 1 commit into from
Jan 25, 2025
Merged

Wichmann-Hill pseudo random #14

merged 1 commit into from
Jan 25, 2025

Conversation

shawntoffel
Copy link
Owner

@shawntoffel shawntoffel commented Jan 25, 2025

  • Implemented the Wichmann-Hill pseudo random algorithm based on: "Algorithm AS 183: An Efficient and Portable Pseudo-Random Number Generator" by B. A. Wichmann and I. D. Hill. This decouples the results from the random implementation in Go, or any other programming language.
  • Replaced use of the 1.17 sort with sort.SliceStable. The sort implementation changed in Go 1.18 such that equal elements may not stay in their original order. sort.SliceStable ensures that the original order is maintained.
  • Updated tests to reflect results of new pseudo random algorithm.
  • Removed election of all hopeful if none can be excluded. Allow additional rounds to resolve elected candidates.

@shawntoffel shawntoffel self-assigned this Jan 25, 2025
@shawntoffel shawntoffel merged commit f3f330e into master Jan 25, 2025
2 checks passed
@shawntoffel shawntoffel deleted the random branch January 25, 2025 06:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant