Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement rand() #137

Merged
merged 3 commits into from
Jun 9, 2020
Merged

Implement rand() #137

merged 3 commits into from
Jun 9, 2020

Conversation

jmkuhn
Copy link
Contributor

@jmkuhn jmkuhn commented Jun 9, 2020

Implements rand() but not randn() or randexp(). We should implement the Ziggurat Method for randn() and randexp(). Most of the tests including hist() were copied directly from stdlib/Random/test. Partially addresses issue #80.

@stevengj
Copy link
Member

stevengj commented Jun 9, 2020

Seems like we could use the simpler Box–Muller method for randn to start with, and -log1p(-rand()) for randexp, which have the advantage of being precision-independent.

src/DecFP.jl Show resolved Hide resolved
@stevengj stevengj merged commit 10dfa6b into JuliaMath:master Jun 9, 2020
@jmkuhn jmkuhn deleted the rand branch June 9, 2020 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants