-
prime tests in java
i need a fast method to find if a number is prime. the number is alway more than 5 and less than 100000000
i have tried the sieve of Eratosthenes, but it sometimes runs into a memory stack overflow error.
-
Some ideas for prime tests in java
Maybe either of these may do....not too sure how fast they are but they might be useful: -
http://www.brighton.ac.uk/java/exercise/s_ch4_4.html
http://www.computing.net/programming...rum/11287.html
Not surprised about the stack overflow errors though. :)
nexus.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks