Re: [R] sum to infinity

2010-09-13 Thread David Winsemius
On Sep 13, 2010, at 5:24 AM, tuggi wrote: hello, can i calculate a sum to infinity in R. i want to do something like this: \sum_{i=0}^\infty \frac{2^{-d-1}}{\Gamma(\frac{d-1}{2})}\left(\frac{\Gamma(2d-3)(2- d)_{i}\Gamma(i+1,-z/2)2^{i+1}}{\Gamma(d-1)(4-2d)_{i}i!}\right)+ \\ \sum_{i=0}^\inft

[R] sum to infinity

2010-09-13 Thread tuggi
hello, can i calculate a sum to infinity in R. i want to do something like this: \sum_{i=0}^\infty \frac{2^{-d-1}}{\Gamma(\frac{d-1}{2})}\left(\frac{\Gamma(2d-3)(2-d)_{i}\Gamma(i+1,-z/2)2^{i+1}}{\Gamma(d-1)(4-2d)_{i}i!}\right)+ \\ \sum_{i=0}^\infty \frac{2^{-d-1}}{\Gamma(\frac{d-1}{2})}\left(\fr

Re: [R] sum to infinity

2009-03-25 Thread Jorge Ivan Velez
Dear Roslina, For $m \rightarrow \infty$ that sum is exp(1)-1: > options(digits=20) > exp(1)-1 [1] 1.718281828459045 > m<-20 > sum(1/factorial(1:20)) [1] 1.718281828459045 HTH, Jorge On Wed, Mar 25, 2009 at 8:43 PM, Roslina Zakaria wrote: > > Hi r-users, > > How do we evaluate the summation

Re: [R] sum to infinity

2009-03-25 Thread Mandro Litt
Well, sum of 1/m! is e--does that answer your question? Generally, I guess you have to decide how much error you're comfortable with; then using an error approximation formula, you can back out the M at which you can stop the sum. Then you can write a for loop that ends at M. Hope that helps. O

[R] sum to infinity

2009-03-25 Thread Roslina Zakaria
Hi r-users, How do we evaluate the summation of (1/m!) from 0 to infinity (for example). Any help is very much appreciated. Thank you. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide