Skip to content

An open-source Prime Number finder that outputs all found numbers in an extremely compact file. It can go as large as high as the Java 9223372036854775807 for the number or 9.2 petabytes for the file.

Notifications You must be signed in to change notification settings

ChlodAlejandro/PrimeFinder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

PrimeFinder

PrimeFinder is an open-source Prime Number finder that outputs all found numbers in an extremely compact file. It can go as large as high as the Java long limit for the number or 9223372036854775807 bytes for the file.

The common rate is 1000 primes per second, which is about 10 kB per second. The system automatically stops if the output file is exceeding the long limit (which requires 9 exabytes) or the system has reached the number "9223372036854775807," commonly known as the Java long Maximum Value. At a rate of 100K numbers per second, it would still take more than a decade to complete the calculations.

This software is under the CC BY (Creative Commons Attribution 4.0 International) license, which allows you to remix, adapt, change, modify, distribute, share under commercial terms as long as credit is given and a copy of this license is provided. You can read more about that here.

If you want to access the pre-built Java ARchive file, you can go to the releases page and download a copy.

To run the JAR on it's own without modification, run the following in your command line:

java -jar PrimeFinder.jar <maximum number> <maximum file size>

where <maximum number> is the highest number that the program will reach, and <maximum file size> is the largest output file size that the program will handle. If you commit an error on either argument, values will default to the Java long Maximum Value. If you have the wrong number of arguments, the program will not run.

If you run this on a supercomputer, I would love to know the highest you got. Maybe you can even reach the Java long Maximum Value. Report all issues to the issue tracker. You can also add improvements to optimize the code!

A 100 MB (GitHub maximum file limit) text file of prime numbers have been included for fun.

About

An open-source Prime Number finder that outputs all found numbers in an extremely compact file. It can go as large as high as the Java 9223372036854775807 for the number or 9.2 petabytes for the file.

Topics

Resources

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Languages