On Thu, 05 Jan 2006 09:47:02 -0600, Robert Kern <[EMAIL PROTECTED]> wrote:
>Bengt Richter wrote: >> On 4 Jan 2006 12:46:47 -0800, "Raven" <[EMAIL PROTECTED]> wrote: > >>>The problem with Stirling's approximation is that I need to calculate >>>the hypergeometric hence the factorial for numbers within a large range >>>e.g. choose(14000,170) or choose(5,2) >> >> It seems you are hinting at some accuracy requirements that you haven't >> yet explained. I'm curious how you use the values, and how that affects your >> judgement of Stirling's approximation. In fact, perhaps the semantics of your >> value usage could even suggest an alternate algorithmic approach to your >> actual end result. > >Does it matter? Implementing Stirling's approximation is pointless when >scipy.special.gammaln() or scipy.special.gamma() does it for him. > Who's talking about implementing Stirling's approximation? ;-) I'm trying to determine first why the OP is thinking there's a problem with using it at all. With "alternate algorithmic approach" I didn't mean an alternate way of calculating Stirling's approximation. I meant to allude to the possibility that pulling a little further on the requirements thread might even unravel some of the rationale for calculating the hypergeometric per se, depending on how he's actually using it and why. Same old, same old: requirements, requirements ;-) Regards, Bengt Richter -- http://mail.python.org/mailman/listinfo/python-list