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:<jdnew...@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 <xforst...@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@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. ______________________________________________ R-help@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.