Consider:
1) Stirling's Formula has applications to #2 and #3
2) Gamma Functions instead of factorials
3) Combinations: Excluding the weird negative factorials, what you have there is "i choose alpha" times "n choose i"
Hi,
Imagine I got the following series:
In which u [0,1] (and u REAL)
While and i and n are INTEGERS
The (-1)^something causes an alternating sign, in this way the sum doesn't explode, but seems to end up with a real number between 0 and 1,
adding something big, substracting something even bigger and so on...
(In case the factorial of a negative number is needed, for example in (i- )! this is set to 1.
The problem is that I need to compute the result of this series for large n (say 10000) and my computer breaks down on n! (of couse) for large n.
Is there an easier way to get to a result without computer overflow?
Thanks,
Gerrit
Consider:
1) Stirling's Formula has applications to #2 and #3
2) Gamma Functions instead of factorials
3) Combinations: Excluding the weird negative factorials, what you have there is "i choose alpha" times "n choose i"
Thanks a lot! I'll look at it tomorrow. I forgot to tell that
I don't see how the negative factorial can be avoided, as in "i choose " you will also get (i- )<0
I looked the Gamma function up, but what's the advantage of using it? It's just the same as a factorial, so it will result in huge numbers as well, won't it?
The stirling formula looks promising (neither knew that one), I'll have a closer look at that.
Are you sure that adding and substracting huge numbers can be avoided by use of one of these functions? The term u^i seems to destroy the possibility to divide huge numbers between each other to small ones before adding them in the sum, as u^i is different for every i term.
BTW1: the formula came from: (n choose ) times ([n- ] choose [i- ])
BTW2: What do you mean by #2 and #3?
Compute one term in terms of the preceding one.
Suppose you have a series with general term then if you have the value of, say, the 100th term, (n=99), the next term would be calculated by dividing that value by 100 and then multiplying by
Thanks, but that doesn't make you get rid of the big numbers, does it?
Imagine that n=4 and =0, then you get:
+1*[4!/(0!0!4!)]u^0-1*[4!/(0!1!3!)]u^1+1*[4!/(0!2!2!)]u^2-1*[4!/(0!3!1!)]u^3+1*[4!/(0!4!0!)]u^4 =
= u^0 -4u^1 +6u^2 -4u^3 + u^4
Which you would compute as: u^0*(1-u*[4-u*{6-u*(4-u)}])
In that way, for huge n, you will still have the huge integers adding and substracting to eachother, or not?
Doesn't this series converge to something?