Good point copeg, is there any way to implement it into a concursive method?
Pseudocode for dual-core:
core0 performs the sieve up to half Integer.MAX_VALUE
core1 performs the sieve from half...
Type: Posts; User: aesguitar
Good point copeg, is there any way to implement it into a concursive method?
Pseudocode for dual-core:
core0 performs the sieve up to half Integer.MAX_VALUE
core1 performs the sieve from half...
I believe this is what you're looking for:
//shows all prime numbers to a specified max
ArrayList<Long> sieve = new ArrayList<Long>();
public static ArrayList<Long> primesUpTo(int n) {...