in reply to Re: Stirling Approx to N! for large Number?
in thread Stirling Approx to N! for large Number?

Why not use natural log anyway?
In Perl, the log function does return the natural log. However, it is a property of logarithms that the logarithms of the same number in a different base differ only by a constant multiplicitave constant. That is to say that loga(x) = logb(x)/logb(a). So if one person used their favorite base and you have a different favorite base, you need only scale their answer by a factor of logyours(theirs).

thor

Feel the white light, the light within
Be your own disciple, fan the sparks of will
For all of us waiting, your kingdom will come

  • Comment on Re^2: Stirling Approx to N! for large Number?

Replies are listed 'Best First'.
Re^3: Stirling Approx to N! for large Number?
by chas (Priest) on Mar 25, 2005 at 13:24 UTC
    Yes, I guess I was thinking the OP meant $n*log(e) rather than e*log($n) (the former is correct), but then log(e) = 1 if log is the natural log (so I wondered if some other log was meant.) You're correct that my comment about using natural log is extraneous...thanks.
    chas