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.mers] should use math font for (1u<<w)-1u #4292
Comments
Should all the relations in that paragraph be maths, not code? |
That would probably be an improvement, but the only one that causes me physical pain is the one that won't compile. Every engine and engine adaptor in [rand.eng] and [rand.adapt] has similar relations as code, but I think [rand.eng.mers] is the only one that's a real problem. |
Hm, maybe we need more thorough cleanup. I don't like silently conflating different symbols, and Once everything is properly defined and bound, we can consider mixing relational C++ expressions and mathematical inequalities, though I'd still prefer if we could just use one (i.e. just mathematical inequalities). |
[rand.eng.lcond] p3 would be simpler stated as maths:
We don't need to special case
(Yes, we should introduce a and c instead of |
I think we should put blanket wording in [rand.eng] saying that a placeholder p has the value of the template argument that is substituted for the template parameter of the same name, |
Yes, blanket wording would help a lot. |
In [rand.eng.mers] p4 the expression
(1u<<w) - 1u
is used repeatedly. Ifw==numeric_limits<unsigned>::digits
that is ill-formed.In the synopsis above we use
{ return 2w - 1; }
despite that being actual C++ code, so why can't we do the same in the prose that follows it?i.e. replace the code font expressions like
a <= (1u<<w) - 1u
witha
≤ 2w - 1 to be clear that the rules of C++ unsigned integer arithmetic do not apply.The text was updated successfully, but these errors were encountered: