1 ! Copyright (c) 2007 Aaron Schaefer, Samuel Tardieu.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: math.primes sequences ;
6 ! http://projecteuler.net/index.php?section=problems&id=10
11 ! The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17.
13 ! Find the sum of all the primes below two million.
19 : euler010 ( -- answer )
20 2000000 primes-upto sum ;
22 ! [ euler010 ] 100 ave-time
23 ! 15 ms ave run time - 0.41 SD (100 trials)