Terry J. Reedy <tjre...@udel.edu> added the comment:

If you semi-optimize the implementation by pre-cancelling out the larger
of the denominators, then these functions would be justified as more
efficient than the naive use of the factorial function indicated by the
formulas.

Possible shorter names:
ncombos
nperms
ncombos_with_reps

I would prefer that these and other integer-only functions be in a
separate imath module.  I have the impression that this was not done
with the first because "we can't have a module with just one function",
but these would make at least 4 or 5, which is enough for a module.

----------
nosy: +tjreedy

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

Reply via email to