------- Comment #5 from pcarlini at suse dot de  2007-10-19 10:49 -------
To wit, this kind of change, you can certainly apply it to the 4.2.1 headers
as-is:

Index: random
===================================================================
--- random      (revision 129456)
+++ random      (working copy)
@@ -1607,7 +1607,8 @@
         {
          typedef typename __gnu_cxx::__add_unsigned<typename
            _UniformRandomNumberGenerator::result_type>::__type __utype;
-         return result_type(__utype(__urng()) % (__max - __min + 1)) + __min;
+         return result_type((__max - __min + 1.0L) * __utype(__urng())
+                            / (__urng.max() + 1.0L)) + __min;
        }

       template<typename _UniformRandomNumberGenerator>


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33815

Reply via email to