Boost C++ Libraries: Ticket #9361: boost::random::xor_combine max() has wrong https://svn.boost.org/trac10/ticket/9361 <p> In haeder &lt;boost/random/xor_combine.hpp&gt; line139: </p> <pre class="wiki">static result_type max BOOST_PREVENT_MACRO_SUBSTITUTION () { return (std::max)((URNG1::min)(), (URNG2::max)()); } </pre><p> URNG1::min has wrong, maybe correctly is URNG1::max. </p> <p> correct as below: </p> <pre class="wiki">static result_type max BOOST_PREVENT_MACRO_SUBSTITUTION () { return (std::max)((URNG1::max)(), (URNG2::max)()); } </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/9361 Trac 1.4.3 Steven Watanabe Mon, 10 Mar 2014 23:21:47 GMT <link>https://svn.boost.org/trac10/ticket/9361#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9361#comment:1</guid> <description> <p> Actually both are wrong in the general case. min and max both need to take shift into account. </p> </description> <category>Ticket</category> </item> </channel> </rss>