Skip to content

Bias in the PRNG #10

Description

@audinowho

Scaling to int range via modulo has a bias towards lower numbers which gets much worse very high ranges. This is due to the generated UInt64 not necessarily being wholly divisible by the maxvalue.

Also, scaling to double in [0, 1) via division has a bias towards fractions of 2^64.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions