1 | test_mpow = ->
|
2 | logout("testing mpow\n")
|
3 |
|
4 |
|
5 | # small numbers
|
6 |
|
7 | for i in [-10...10]
|
8 | a = mint(i)
|
9 | x = 1
|
10 | for j in [0...10]
|
11 | b = mpow(a, j)
|
12 | c = mint(x)
|
13 | if (mcmp(b, c) != 0)
|
14 | throw new Error("failed test_mpow")
|
15 | x *= i
|
16 |
|
17 |
|
18 | logout("ok\n")
|
19 |
|
20 | #endif
|