{"id":13735982,"url":"https://github.com/JeffersonLab/drand48","last_synced_at":"2025-05-08T12:31:38.842Z","repository":{"id":144819010,"uuid":"105293561","full_name":"JeffersonLab/drand48","owner":"JeffersonLab","description":"Nim implementation of standard unix drand48 random number generator","archived":false,"fork":false,"pushed_at":"2020-12-22T22:06:56.000Z","size":16,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-11-15T04:31:17.349Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Nim","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JeffersonLab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-09-29T16:22:23.000Z","updated_at":"2024-11-13T21:52:40.000Z","dependencies_parsed_at":"2024-01-06T12:03:31.735Z","dependency_job_id":null,"html_url":"https://github.com/JeffersonLab/drand48","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JeffersonLab%2Fdrand48","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JeffersonLab%2Fdrand48/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JeffersonLab%2Fdrand48/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JeffersonLab%2Fdrand48/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JeffersonLab","download_url":"https://codeload.github.com/JeffersonLab/drand48/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253068568,"owners_count":21848829,"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":[],"created_at":"2024-08-03T03:01:13.770Z","updated_at":"2025-05-08T12:31:38.578Z","avatar_url":"https://github.com/JeffersonLab.png","language":"Nim","funding_links":[],"categories":["Operating System"],"sub_categories":["Randomization"],"readme":"# Drand48 [![Build Status](https://travis-ci.org/JeffersonLab/drand48.svg?branch=master)](https://travis-ci.org/JeffersonLab/drand48)\n\nNim implementation of the standard unix drand48 pseudo random number generator.\n\nAll the routines work by generating a sequence of 48-bit integer values, Xi , \naccording to the linear congruential formula:\n\nXn+1 = (aXn + c) mod m   n\u003e= 0\n\nThe parameter m = 248; hence 48-bit integer arithmetic is performed. \nThe multiplier value a and the addend value c are given by:\n\na = 0x5DEECE66D = 0c273673163155\nc = 0xB = oc13\n\nThe value returned by any of the drand48() is computed by first\ngenerating the next 48-bit Xi in the sequence. Then the appropriate\nnumber of bits, according to the type of data item to be returned, are\ncopied from the high-order (leftmost) bits of Xi and transformed into the returned value.\n \nThe drand48() function stores the last 48-bit Xi generated in an \ninternal buffer; that is why they must be initialised prior to being invoked. \n\nThe initializer function srand48() sets the high-order 32 bits of Xi to \nthe low-order 32 bits contained in its argument. The low-order 16 bits \nof Xi are set to the arbitrary value 0x330E .\n\nThe initializer function seed48() sets the value of Xi to the 48-bit value \nspecified in the argument array. The seed can be set with the 48-bit\nseed split into four 12-bit chunks, or as a 48-bit int.\n\nThere are functions savern12() and savern48() that returns the current random number seed.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJeffersonLab%2Fdrand48","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FJeffersonLab%2Fdrand48","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJeffersonLab%2Fdrand48/lists"}