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

Poisson u64 sampling #1498

Merged
merged 5 commits into from
Oct 1, 2024
Merged

Conversation

benjamin-lieser
Copy link
Collaborator

@benjamin-lieser benjamin-lieser commented Sep 26, 2024

  • Added a CHANGELOG.md entry

Summary

This addresses #1497 by adding Distribution<u64>
It also solves #1312 by not allowing lambda bigger than 1.844e19 (this also makes them always fit into u64)

Details

The Distribution<u64> is a breaking change and will have a bit of negative impact on the call side, because it requires sometimes type annotations.
Alternatively we keep the maximum lambda and document that it is always safe to just as u64 on the samples if required.

rand_distr/src/poisson.rs Outdated Show resolved Hide resolved
rand_distr/src/poisson.rs Outdated Show resolved Hide resolved
rand_distr/src/poisson.rs Outdated Show resolved Hide resolved
rand_distr/src/poisson.rs Show resolved Hide resolved
@dhardy dhardy merged commit e2092e9 into rust-random:master Oct 1, 2024
14 checks passed
@benjamin-lieser benjamin-lieser deleted the poisson_u64_sampling branch October 8, 2024 11:08
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