Daniel Stutzbach <dan...@stutzbachenterprises.com> added the comment:
On Tue, May 11, 2010 at 5:33 PM, Alexander Belopolsky <rep...@bugs.python.org> wrote: > It seems to me that the value of n for which number of digits will exceed > sys.maxsize can be estimated fairly accurately using Stirling formula. Only > two values are relevant in practice - one for sys.maxsize = 2**63-1 and the > other for sys.maxsize = 2**31-1. These values can be hardcoded and factorial > can quickly report the case when n! will exceed maxsize digits instead of > hanging until memory is exhausted. Isn't that adding an extra check in every case to speed up a you-can't-seriously-expect-that-to-work corner case? ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue8692> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com