-
-
Notifications
You must be signed in to change notification settings - Fork 740
Add a note about word size to the MersenneTwisterEngine changelog entry #5141
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
Conversation
Handling of the word size `w` has been fixed so that the generator will | ||
now properly handle cases where it is less than the number of bits in | ||
the chosen `UIntType`. This has been validated against the behaviour | ||
of the C++11 standard implementation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there an implementation in the C++ standard? Otherwise, the wording here is slightly confusing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, good point. Obviously I compared against an implementation of the C++11 standard. However the standard itself does mandate the expected behaviour (which is really only re-stating the expected behaviour of the algorithm itself). See p. 899 (numbers; p. 913 in your PDF browser) of http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3337.pdf.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll rephrase to an implementation of the C++11 standard
.
Amused to see that code coverage metrics can change because of a tweak to a changelog entry ... :-P |
This was an oversight when finalizing dlang#5011.
d021e2e
to
c0d7271
Compare
Updated to improve the wording: diff --git a/changelog/std-random-MersenneTwisterEngine.dd b/changelog/std-random-MersenneTwisterEngine.dd
index 7d97481..0fa3d23 100644
--- a/changelog/std-random-MersenneTwisterEngine.dd
+++ b/changelog/std-random-MersenneTwisterEngine.dd
@@ -5,7 +5,7 @@ tempering parameter `d` and the initialization multiplier `f`).
Handling of the word size `w` has been fixed so that the generator will
now properly handle cases where it is less than the number of bits in
the chosen `UIntType`. This has been validated against the behaviour
-of the C++11 standard implementation.
+of a widely-used implementation of the C++11 standard.
For anyone using the standard template instantiation `Mt19937` this will
have no noticeable effect. However, these will be breaking changes for |
... and now it's somehow gained code coverage, despite not touching any actual code :-P There must be a rounding error out there somewhere ... @JackStouffer assuming you're happy with the new wording, dlang-bot seemed to dislike your tag ;-) |
Well, that's a feature that |
Ah, good point :-) Thanks for the clarification! |
Add a note about word size to the MersenneTwisterEngine changelog entry merged-on-behalf-of: Jack Stouffer <jack@jackstouffer.com>
The problem is that CircleCi merges the PR with |
This was an oversight when finalizing #5011.