MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

fastest way to add up a billion numbers

  • To: mathgroup at smc.vnet.net
  • Subject: [mg73880] fastest way to add up a billion numbers
  • From: "Raj" <rajanikanth at gmail.com>
  • Date: Fri, 2 Mar 2007 06:41:46 -0500 (EST)

hi!

Could somebody tell me what would be the fastest way to add up a
billion numbers(from 1 to 10^9 i.e the first billion numbers) in
Mathematica?

Ofcourse the answer is n(n+1)/2, but is there any other way in
Mathematica other than the following one:

Total@@Range[10^9]

Thanks,

Raj



  • Prev by Date: Re: monomials in Graded Lexicographic Order and associated factorials
  • Next by Date: need MathLie mathematica package
  • Previous by thread: Re: Re: Means
  • Next by thread: Re: fastest way to add up a billion numbers