core_marking1/collatz_test2.scala
author Christian Urban <christian.urban@kcl.ac.uk>
Wed, 02 Nov 2022 21:49:42 +0000
changeset 430 274c865b3878
parent 424 daf561a83ba6
permissions -rw-r--r--
updated
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
424
Christian Urban <christian.urban@kcl.ac.uk>
parents: 373
diff changeset
     1
import C1._
373
d29cd5883c7b updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
     2
424
Christian Urban <christian.urban@kcl.ac.uk>
parents: 373
diff changeset
     3
assert(collatz_max(10) == (19, 9))
Christian Urban <christian.urban@kcl.ac.uk>
parents: 373
diff changeset
     4
assert(collatz_max(100) == (118, 97))
Christian Urban <christian.urban@kcl.ac.uk>
parents: 373
diff changeset
     5
assert(collatz_max(1000) == (178, 871))
Christian Urban <christian.urban@kcl.ac.uk>
parents: 373
diff changeset
     6
assert(collatz_max(10000) == (261, 6171))
Christian Urban <christian.urban@kcl.ac.uk>
parents: 373
diff changeset
     7
assert(collatz_max(100000) == (350, 77031))
Christian Urban <christian.urban@kcl.ac.uk>
parents: 373
diff changeset
     8
assert(collatz_max(1000000) == (524, 837799))
Christian Urban <christian.urban@kcl.ac.uk>
parents: 373
diff changeset
     9
assert(collatz_max(2) == (1, 2))
Christian Urban <christian.urban@kcl.ac.uk>
parents: 373
diff changeset
    10
assert(collatz_max(77000) == (339, 52527))