Skip to content

RFC: add support for generating pseudorandom numbers using TinyMT64 #201

Open
@kgryte

Description

@kgryte

Checklist

Please ensure the following tasks are completed before submitting a feature request.

  • Read and understood the Code of Conduct.
  • Searched for existing issues and pull requests.
  • The issue name begins with RFC:.

Description

Description of the feature request.

This RFC proposes to add support for the Tiny Mersenne Twister algorithm for generating pseudorandom numbers (64-bit). Should be similar in its API to @stdlib/random/base/minstd.

Package: @stdlib/random/base/tinymt64
Alias: tinymt64

Related Issues

Does this feature request have any related issues?

No.

Questions

Any questions for reviewers?

The general difficulty of this implementation is not its algorithm, but rather how to support its implementation in JavaScript. As JavaScript does not have universal support for 64-bit integers (BigInt proposal is still stage 3 and backward compatibility is difficult), implementing in JavaScript requires considerable work. While WASM may provide one avenue, it still does not solve the backward compatibility issue. For backward compatibility, some sort of 64-bit integer emulation is necessary.

Other

Any other information relevant to this feature request? This may include screenshots, references, sample output, and/or implementation notes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FeatureIssue or pull request for adding a new feature.MathIssue or pull request specific to math functionality.Needs DiscussionNeeds further discussion.RFCRequest for comments. Feature requests and proposed changes.difficulty: 5Likely to be difficult to implement with several unknowns.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions