Created on 2024-09-18.00:00:00 last changed 3 weeks ago
Proposed resolution:
This wording is relative to N4988.
Modify [rand.eng.philox] as indicated:
-1- A `philox_engine` random number engine produces unsigned integer random numbers in theclosedinterval [0, m]), where m = 2w− 1and the template parameter w defines the range of the produced numbers.
[ Wrocław 2024-11-23; Status changed: Voting → WP. ]
[ 2024-10-02; Reflector poll ]
Set status to Tentatively Ready after six votes in favour during reflector poll.
There is a typo in `philox_engine` wording that makes "-1" two times instead of one for `max()` method. The reason for that typo is that the wording was originally inspired by `mersenne_twister_engine` but after getting feedback that what is written in the `philox_engine` synopsis is not C++ code, the authors introduced the m variable (as in `subtract_with_carry_engine`) but forgot to remove "-1" in the m definition.
Note: after the proposed resolution below is applied the m variable could be reused in other places: basically in all places where the `mod 2^w` pattern appears (like `subtract_with_carry_engine` does). The authors don’t think it’s worth changing the rest of the wording to reuse the m variable. If somebody thinks otherwise, please provide such feedback.
History | |||
---|---|---|---|
Date | User | Action | Args |
2024-11-28 21:40:31 | admin | set | messages: + msg14495 |
2024-11-28 21:40:31 | admin | set | status: voting -> wp |
2024-11-19 16:09:07 | admin | set | status: ready -> voting |
2024-10-02 12:35:56 | admin | set | messages: + msg14402 |
2024-10-02 12:35:56 | admin | set | status: new -> ready |
2024-09-18 12:56:54 | admin | set | messages: + msg14369 |
2024-09-18 00:00:00 | admin | create |