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

[rand.eng], [rand.adapt] Use maths to describe relations between constants #4295

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

jwakely
Copy link
Member

@jwakely jwakely commented Oct 8, 2020

Fixes #4292

I know that "unless otherwise specified" is strictly unnecessary in the blanket wording, but I think it helps here. In [rand.eng.lcong] we have:

If the template parameter m is 0, the modulus m used throughout this subclause (...) is [...]

That specifies m for the m==0 case, but the blanket wording applies for all other values of m.

@wg21bot wg21bot added the needs rebase The pull request needs a git rebase to resolve merge conflicts. label Dec 17, 2021
@jwakely jwakely force-pushed the rand.eng-moar-maths branch from caeb8c3 to 5383a93 Compare April 20, 2022 09:17
@jwakely jwakely marked this pull request as ready for review April 20, 2022 09:25
@jwakely jwakely removed the needs rebase The pull request needs a git rebase to resolve merge conflicts. label Apr 20, 2022
@tkoeppe
Copy link
Contributor

tkoeppe commented Aug 22, 2022

@jwakely, @CaseyCarter, @W-E-Brown: I would love to land this change. It would leave a lot less to the imagination and make it clear how the code variables relate to the maths variables. Any final thoughts?

@jwakely
Copy link
Member Author

jwakely commented Aug 22, 2022

I still like this change. It might be even better if we used something like D for numeric_limits<result_type>::digits so that we didn't have that C++ expression amongst the math relations, but that could be done separately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs rebase The pull request needs a git rebase to resolve merge conflicts.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[rand.eng.mers] should use math font for (1u<<w)-1u
3 participants