This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rhettinger
Recipients mark.dickinson, rhettinger, tim.peters
Date 2020-07-30.23:49:20
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1596152961.21.0.178129616119.issue41131@roundup.psfhosted.org>
In-reply-to
Content
FWIW, I paid close attention to rounding.  The reason for the "while small and large" is that the loop stops making aliases unless we have both something at or below 0.5 and something known to be above 0.5.  If we end up with only two bins slightly above over below 0.5, they are considered close-enough and will alias to themselves.

By giving the bins a default alias to themselves, there is always a reasonable dispatch in the main sampling loop even if the random() value compares to an unfavorably rounded entry in U.

The code assumes that weird roundings will happen through out.
History
Date User Action Args
2020-07-30 23:49:21rhettingersetrecipients: + rhettinger, tim.peters, mark.dickinson
2020-07-30 23:49:21rhettingersetmessageid: <1596152961.21.0.178129616119.issue41131@roundup.psfhosted.org>
2020-07-30 23:49:21rhettingerlinkissue41131 messages
2020-07-30 23:49:20rhettingercreate