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 belopolsky
Recipients belopolsky, mark.dickinson, rhettinger, stutzbach
Date 2010-05-12.14:39:35
SpamBayes Score 0.00592333
Marked as misclassified No
Message-id <>
In-reply-to <>
On Tue, May 11, 2010 at 5:58 PM, Mark Dickinson <> wrote:
> Yes, I'm interested in seeing the pure Python version.

Here is my translation of the reference implementation.

> It could go into test_math, and would be a useful form of documentation.

Note that I copied the reference implementation recursive logic rather
than that in the proposed patch.  It may be better for documentation
this way.

If we end up using something like this in documentation, I would
rename nminusnumofbits() to something more readable.  Maybe "ntwos" or
"count_trailing_zeros" with an explanation why number of factors of 2
in factorial(n) is n - popcount(n).
File name Uploaded belopolsky, 2010-05-12.14:39:21
Date User Action Args
2010-05-12 14:44:45belopolskysetrecipients: + belopolsky, rhettinger, mark.dickinson, stutzbach
2010-05-12 14:41:53belopolskylinkissue8692 messages
2010-05-12 14:40:26belopolskycreate