Just a minimal tester for collatz conjecture
$ git clone https://codeberg.org/XDream8/collatz-problem-tester
$ cd collatz-problem-tester
$ cargo build --profile optimized
$ ./target/optimized/collatz-problem-tester -h
$ collatz-problem-tester -h
$ collatz-problem-tester [flags] <number>
Test a random number.
By default u16 numbers are generated
With -u8
, -u16
, -u32
, -u64
flags you can set how big you want your random number to be
$ collatz-problem-tester --random
$ collatz-problem-tester --random -u8
$ collatz-problem-tester --random -u16
$ collatz-problem-tester --random -u32
$ collatz-problem-tester --random -u64
Log everything that's going on(might cause performance issues for big numbers). Disabled by default.
$ collatz-problem-tester --verbose 6
Optimised odd algorithm(instead of '3k+1' use '2k+2'. This will speed up the process a lot since this will reduce the tries that needs to be made to find the end result. Just try and see it yourself.
$ collatz-problem-tester --optimised-odd-algorithm 91