21-Apr-2023 19:26:53 cycle_brent_test(): MATLAB/Octave version 5.2.0. Test cycle_brent(). cycle_brent_test01(): test cycle_brent() on F1(). f1(0) = 6. f1(1) = 6. f1(2) = 0. f1(3) = 1. f1(4) = 4. f1(5) = 3. f1(6) = 3. f1(7) = 4. f1(8) = 0. Starting argument X0 = 2 Reported cycle length is 3 Expected value is 3 Reported distance to first cycle element is 2 Expected value is 2 cycle_brent_test02(): Test cycle_brent() for F2(). f2(i) = mod ( 22 * i + 1, 72 ). Starting argument X0 = 0 Reported cycle length is 9 Expected value is 9 Reported distance to first cycle element is 3 Expected value is 3 cycle_brent_test03(): Test cycle_brent() for f3(). f3(i) = mod ( 123 * i + 456, 100000 ). Starting argument X0 = 789 Reported cycle length is 50000 Expected value is 50000 Reported distance to first cycle element is 0 Expected value is 0 cycle_brent_test04(): Test cycle_brent() for f4(). f4(i) = mod ( 31421 * i + 6927, 65536 ). Starting argument X0 = 1 Reported cycle length is 65536 Expected value is 65536 Reported distance to first cycle element is 0 Expected value is 0 cycle_brent_test05(): Test cycle_brent() for f5(). f5(i) = mod ( 16383 * i + 1, 65536 ). Starting argument X0 = 1 Reported cycle length is 8 Expected value is 8 Reported distance to first cycle element is 0 Expected value is 0 0 1 1 16384 2 49153 3 32768 4 32769 5 49152 6 16385 7 0 8 1 9 16384 10 49153 cycle_brent_test(): Normal end of execution. 21-Apr-2023 19:26:59