Miscellany
public java v1 · immutableimport java.lang.Math;public class PrimeFinder { public static boolean evaluate(double number) { double limit = Math.sqrt(number) + 2; for ( double check=3; check <= limit; check+=2 ) { if ( number%check == 0) { return false; } } return true; } public static void main (String[] argv) { double limit = Math.pow(10, 6); for ( double i=3; i < limit; i+=2 ) { if ( evaluate(i) ) { System.out.println(i); } } } }