{"id":17644439,"url":"https://github.com/vigna/mrg32k3a","last_synced_at":"2025-05-07T01:41:57.250Z","repository":{"id":145283597,"uuid":"218632201","full_name":"vigna/MRG32k3a","owner":"vigna","description":"A fast, testless MRG32k3a implementation","archived":false,"fork":false,"pushed_at":"2019-11-02T19:27:45.000Z","size":294,"stargazers_count":17,"open_issues_count":0,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-31T05:03:05.010Z","etag":null,"topics":["pseudorandom-number-generator"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vigna.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-10-30T21:43:50.000Z","updated_at":"2025-02-11T23:18:07.000Z","dependencies_parsed_at":"2024-04-19T07:47:50.063Z","dependency_job_id":null,"html_url":"https://github.com/vigna/MRG32k3a","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vigna%2FMRG32k3a","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vigna%2FMRG32k3a/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vigna%2FMRG32k3a/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vigna%2FMRG32k3a/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vigna","download_url":"https://codeload.github.com/vigna/MRG32k3a/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252798189,"owners_count":21805846,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["pseudorandom-number-generator"],"created_at":"2024-10-23T10:05:30.253Z","updated_at":"2025-05-07T01:41:57.241Z","avatar_url":"https://github.com/vigna.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"A fast, testless MRG32k3a implementation\n========================================\n\nThis is a fast, testless implementation based on 64-bit integers of Pierre\nL'Ecuyer's pseudorandom number generator\n[MRG32k3a](https://pubsonline.informs.org/doi/abs/10.1287/opre.47.1.159).\n\nThere are three tests in the standard implementation of MRG32k3a: one test\nto correct the combined output, and two tests to correct negative modular\nresiduals. In this implementation, the first test is avoided by\narithmetization, and the other two by ensuring that the argument to the\nmodulo operator is nonnegative, which is possible because of the small\nsize of the numbers involved.\n\nAdditionally, the output value is computed on the _current_ state,\nrather then on the next state, to give the processor a chance to\nparallelize internally the computation of the output value and of the next\nstate.\n\nOn an Intel® Core™ i7-7700 CPU @3.60GHz, the testless implementation is\nroughly four times faster than the double-based implementation and\ntwo times faster than the trivial 64-bit integer implementation. Please\nsee the comments in the code for more precise data. Note that nothing\ncan beat, for batch generation, the [Intel® Math Kernel\nLibrary](https://software.intel.com/en-us/mkl), which uses vectorized\ninstructions.\n\nWe provide a C implementation and a Java implementation. The Java\ndocumentation can be generated with\n\n    javadoc -d docs MRG32k3a.java\n\nThe stream generated by this implementation is identical to that of the\noriginal one, provided that the initial state is set using the\nprovided methods. Should you manipulate directly the state, you must\nremember that since we emit a result using the current state, you need\nto generate and throw away one output to align the results with\nL'Ecuyer original implementation.\n\nFor convenience, we provide a (uniform across implementations)\nseeding method which uses a 64-bit bit integer and an underlying\nSplitMix64 generator.\n\nseba (\u003cmailto:sebastiano.vigna@unimi.it\u003e)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvigna%2Fmrg32k3a","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvigna%2Fmrg32k3a","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvigna%2Fmrg32k3a/lists"}