Skip to content

Program to calculate the Collatz sequence for very large integers. Using crate BigInt.

Notifications You must be signed in to change notification settings

ratwolfzero/collatz_bigint_file

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

collatz_bigint_file

same as big_int but will write and read the collatz sequence to/from a file "collatz_sequence.txt" to avoid system memory overflow when operating with extremly large integers. With this program I was able to compute 2^100000-1 in about 2 hours and 15 minutes. Size of "collatz_sequence.txt" was 35.2 GB. In this case I did not print the sequence in the terminal and only caluated the statistics.

Don't forget to adopt the constant with the path where to save the file collatz_sequence.txt.

About

Program to calculate the Collatz sequence for very large integers. Using crate BigInt.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages