This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/66302] Wrong output sequence of double precision uniform C++ RNG distribution


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66302

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Andrey Kolesov from comment #0)
> Double precision uniform distribution of C++ random number generators from
> libstdc++ produces sequence which is significantly different from floating
> point and integer (direct engine) generators.
> Double precision sequence contains only every second (odd: 1,3,5,7...)
> element from float and integer sequences. Generally generator output
> shouldn't depend on output data type up to precision bounds.

Where does it say that in the standard?

Your code says:

    /* All three sequences expected to be equal up to precision bounds */

Where does the standard say you should expect that?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]