Factorials of Large Numbers - Printable Version +- HP Forums ( https://archived.hpcalc.org/museumforum)+-- Forum: HP Museum Forums ( https://archived.hpcalc.org/museumforum/forum-1.html)+--- Forum: Old HP Forum Archives ( https://archived.hpcalc.org/museumforum/forum-2.html)+--- Thread: Factorials of Large Numbers ( /thread-24184.html) |

Factorials of Large Numbers - Gordon Dyer - 11-20-2002
I posted an HP-11C/41C program in the Software Library (it's now the first entry) and asked for feedback from anyone who has a real use for this...where n! >= 1E100 Re: Factorials of Large Numbers - Bill Wiese - 11-25-2002
Hi... Whoa, this brings back memories of a 'wasted' summer in high school (1980?) tinkering with my ol' TI58! (Didn't get my 41C til Christmas in my senior year - and then fooling w/system architecture/SP/ byte jumping etc took over...) Wrote various "big factorial" programs, including log(n!) programs and approximations. Stirling's Approx. works progressively better for larger and larger values of n, but has to be 'warped' for moderately useful performance for, say, n<69.
n! ~= sqrt(2*pi*n) * (n/e)^n
Anyway I still remember that 10,000!~= 2.645x10^35659
Nifty little thing: Thus: int(n/5)+int(n/25)+int(n/125)+int(n/625)+int(n/5^5)... gives us number of trailing zeros in n! . 1000! has, IIRC, 249 trailing zeros and 10,000! has 2499 trailing zeros. Factorials are neat. Remember finding out about companion gamma function (I *knew* there must be something continuous over n>=0 for something factorial-like.) That was a fun summer...
Bill Wiese
Re: Factorials of Large Numbers - Gordon Dyer - 12-07-2002
Hi Bill, I'm glad you enjoyed my message. |