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
- Follow-Ups:
- Re: fastest way to add up a billion numbers
- From: János <janos.lobb@yale.edu>
- Re: fastest way to add up a billion numbers
- From: Sseziwa Mukasa <mukasa@jeol.com>
- Re: fastest way to add up a billion numbers
- From: Andrzej Kozlowski <akoz@mimuw.edu.pl>
- Re: fastest way to add up a billion numbers