core_testing1/collatz_test2.scala
author Christian Urban <christian.urban@kcl.ac.uk>
Mon, 08 Nov 2021 01:39:00 +0000
changeset 403 ffce7b61b446
parent 399 b17a98b0c52f
child 472 6a77c260c8a5
permissions -rw-r--r--
updated
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
399
b17a98b0c52f updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 345
diff changeset
     1
import C1._
125
dcaab8068baa updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     2
199
54befaf23648 updated
Christian Urban <urbanc@in.tum.de>
parents: 144
diff changeset
     3
assert(collatz_max(10) == (19, 9))
54befaf23648 updated
Christian Urban <urbanc@in.tum.de>
parents: 144
diff changeset
     4
assert(collatz_max(100) == (118, 97))
54befaf23648 updated
Christian Urban <urbanc@in.tum.de>
parents: 144
diff changeset
     5
assert(collatz_max(1000) == (178, 871))
54befaf23648 updated
Christian Urban <urbanc@in.tum.de>
parents: 144
diff changeset
     6
assert(collatz_max(10000) == (261, 6171))
54befaf23648 updated
Christian Urban <urbanc@in.tum.de>
parents: 144
diff changeset
     7
assert(collatz_max(100000) == (350, 77031))
54befaf23648 updated
Christian Urban <urbanc@in.tum.de>
parents: 144
diff changeset
     8
assert(collatz_max(1000000) == (524, 837799))