Tim Peters added the comment:

> It skews the distribution a tiny little bit, ...

But it doesn't - that's the point ;-)

If double-rounding doesn't occur at all (which appears to be the case on most 
platforms), absolutely nothing changes (because min(int(random() * N), N-1) == 
int(random() * N) on such boxes).

If double-rounding does occur, double-rounding itself may change results "all 
over the place", and I haven't tried to analyze what effects that has on the 
distribution.  In the comparative handful of cases where int(random() * N) == N 
on such boxes, clamping that back to N-1 just yields the same result we would 
have gotten on a box that didn't do double-rounding.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue24567>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to