This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/85439] mt19937_64 producing unexpected result only in certain configuration
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 19 Apr 2018 10:44:54 +0000
- Subject: [Bug libstdc++/85439] mt19937_64 producing unexpected result only in certain configuration
- Auto-submitted: auto-generated
- References: <bug-85439-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85439
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |INVALID
--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Marc "Foddex" Oude Kotte from comment #4)
> Obviously I'm not testing the 10000th consecutive invocation but the 1st,
No, as Walter explained, you're not even doing that.
If you want to inspect the 1st output of the MT engines, or the 10000th, then
do that:
template<typename Generator, template<typename> class, typename Type>
Type generateRandom() {
return Generator()();
}
If you do this you'll see that every implementation produces the same results
from the mersenne-twisters engines.
Your program inspects the output of std::uniform_input_distribution instead.
The standard says nothing about the exact values it produces, only the
distribution of values given a range of inputs. So as Walter suggested, I'm
closing this as INVALID, as there's no bug here.
(Also, stop using names like _Generator, _Dist and _Type, those are reserved
names, see http://en.cppreference.com/w/cpp/language/identifiers for details).