[R] How to do an infinite sum in R

Jeff Newmiller jdnewmil at dcn.davis.CA.us
Fri Nov 16 21:13:59 CET 2012


You would need an infinite amount of time and an infinite amount of numerical precision, all to arrive at the conclusion that the answer is infinite. Or you could take a short cut:

ans <- Inf
---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil at dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
--------------------------------------------------------------------------- 
Sent from my phone. Please excuse my brevity.

Simon Bolivar <xforstuff at gmail.com> wrote:

>I'm having trouble to do an infinite sum in R
>
>I want to do the infinite sum of 1/(1+n)
>
>how would I do this in R?
>
>Thank You
>
>
>
>--
>View this message in context:
>http://r.789695.n4.nabble.com/How-to-do-an-infinite-sum-in-R-tp4649770.html
>Sent from the R help mailing list archive at Nabble.com.
>
>______________________________________________
>R-help at r-project.org mailing list
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide
>http://www.R-project.org/posting-guide.html
>and provide commented, minimal, self-contained, reproducible code.




More information about the R-help mailing list