Skip to content

Incorrect Implementation for DRAND48 (C++) #33

@BujSet

Description

@BujSet

The state of the DRAND48 LCG should be a 48bit value. Currently, the RNGFactory uses the constructor of the LCG base class, which initializes the state to a standard 32 bits. A better solution would be to add a new constructor option that allows for a variable number of state bits (likely passed in as a pointer to a vector of bytes). This will make the update stage a bit more complex, as if the state is larger than 64/32 bits, the multiplication and additions will need to occur iteratively and propagate carries.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingsoftwareFor changes related to software implementations and evaluations of PRNGs

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions