-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
prime.py firstrun finds first 1,000,000th Prime 15485863 something to…
… work with. Signed-off-by: Damian Williamson <[email protected]>
- Loading branch information
Showing
4 changed files
with
125 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,14 @@ | ||
setup | ||
|
||
input number | ||
input whether to fill missing primes | ||
|
||
first run no input fill data file up to some n | ||
|
||
file read | ||
file write | ||
is_prime | ||
from file | ||
add to file | ||
from file check up to fraction | ||
add to file fraction bigger than file check all not divisible by file up to fraction | ||
|
||
If prime output and add to file. | ||
If prime output |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters