Skip to content

Example and NaN fix#2

Open
chrysn wants to merge 5 commits intoryankurte:mainfrom
chrysn-pull-requests:example-and-maybe-fix
Open

Example and NaN fix#2
chrysn wants to merge 5 commits intoryankurte:mainfrom
chrysn-pull-requests:example-and-maybe-fix

Conversation

@chrysn
Copy link
Contributor

@chrysn chrysn commented Nov 25, 2023

This PR does 3 things in commits that should be independent enough that you can cherry-pick if you don't like the bundle:

  • Adds an example for easy cargo run --example osrng that tests the OS's RNG and prints concrete outputs (and gives concrete example values to put into the block size).
  • Switches around the comparisons to make sure NaNs are errors. Closes: nist_freq_block does not err when returning NaN #1
  • Replaces the ad-hoc igamma implementation with one from the special crate.

Big caveat that I only just found while doing further testing: Apparently the special crte does require alloc; checking to see if that can be made optional.

@chrysn
Copy link
Contributor Author

chrysn commented Nov 25, 2023

PR'd on the other end as stainless-steel/special#13.

Copy link
Owner

@ryankurte ryankurte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm (though i created a conflict by merging #3, soz)

PR'd on the other end as stainless-steel/special#13.

nice! no reason to block i think / can update when it's available

@chrysn
Copy link
Contributor Author

chrysn commented Dec 13, 2023

The conflict is resolved by merging the main branch into here. An extra change updates the special dependency, because upstream merged and released the no_alloc fix.

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.

nist_freq_block does not err when returning NaN

2 participants