Commit | Line | Data |
---|---|---|
f4535c64 | 1 | # $Id$ |
ceb3f0c0 | 2 | # |
3 | # Test cases for higher-level binary poly arithmetic. | |
4 | ||
5 | add { | |
6 | 0 0 0; | |
7 | 1 1 0; | |
8 | 1 2 3; | |
9 | 4 5 1; | |
10 | 0x7fb838a8a0a95046b9d9d9fb4440f7bb | |
11 | 0xc1a7bd3b4e853fc92d4e1588719986aa | |
12 | 0xbe1f8593ee2c6f8f9497cc7335d97111; | |
13 | 0x1e2933215e1c3bba8d2b404d98f43086bfc6198a219b168f214042a5e7df6b21 | |
45c0fd36 | 14 | 0x1e2933215e1c3bba8d2b404d98f43086bfc6198a219b168f214042a5e7df6b22 3; |
ceb3f0c0 | 15 | } |
16 | ||
17 | mul { | |
18 | 0 0 0; | |
19 | 1 0 0; | |
20 | 0 1 0; | |
21 | 1 1 1; | |
22 | 0x7fb838a8a0a95046b9d9d9fb4440f7bb | |
23 | 0xc1a7bd3b4e853fc92d4e1588719986aa | |
24 | 0x207ccad257b4ed64447158315bfb9aca5cbc5622cfb8fcbb1380eea1bc5c624e; | |
25 | 0xc1a7bd3b4e853fc92d4e1588719986aa | |
26 | 0x283ed59f1226dcefa7ff0ef87ceff5d5 | |
27 | 0x1e2933215e1c3bba8d2b404d98f43086bfc6198a219b168f214042a5e7df6b22; | |
28 | 0xbe1f8593ee2c6f8f9497cc7335d97111 | |
29 | 0x35a8e33503b3695be00528f8b82db931 | |
30 | 0x1e2933215e1c3bba8d2b404d98f43086bfc6198a219b168f214042a5e7df6b21; | |
31 | } | |
32 | ||
33 | sqr { | |
34 | 0 0; | |
35 | 1 1; | |
36 | 3 5; | |
37 | 0x7fb838a8a0a95046b9d9d9fb4440f7bb | |
38 | 0x1555454005404440440044411100101445415141514155451010100055154545; | |
39 | 0x01f081e69f45d3254530766ab98d55fa612c7bb27ea31bc2621d894be9c0b196b3 | |
40 | 0x0155004001541441551011510504111011050015141444454140511111554414010450154545041554440501455004140401514041104554415000450141144505; | |
41 | } | |
42 | ||
43 | div { | |
44 | 0 1 0 0; | |
45 | 0x207ccad257b4ed64447158315bfb9aca5cbc5622cfb8fcbb1380eea1bc5c624e | |
46 | 0x7fb838a8a0a95046b9d9d9fb4440f7bb | |
47 | 0xc1a7bd3b4e853fc92d4e1588719986aa 0; | |
48 | 0x6e0e2a282a5411ae76767ed1103deef069ef4ed3a14ff24b | |
49 | 0x5385621c6661aaa35a24150d2c08332e | |
50 | 0x01c2334cc957151dc7 | |
51 | 0x398c4111da6d06cdf3d83704ee403101; | |
52 | } | |
53 | ||
f4535c64 | 54 | exp { |
55 | 4 0 1; | |
56 | 4 1 4; | |
57 | 0x7 2 0x15; | |
58 | 3 563 0xf000f000f000f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f000f000f000f; | |
59 | } | |
60 | ||
432c4e18 | 61 | irred { |
00f096fc MW |
62 | 0 0; |
63 | 1 0; | |
64 | 2 1; | |
432c4e18 | 65 | 0xc1a7bd3b4e853fc92d4e1588719986aa 0; |
66 | 0x800000000000000000000000000000000000000c9 1; | |
67 | 0x2000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000001 1; | |
68 | } | |
69 | ||
ceb3f0c0 | 70 | gcd { |
71 | 0xc1a7bd3b4e853fc92d4e1588719986aa | |
72 | 0xbe1f8593ee2c6f8f9497cc7335d97111 | |
73 | 3 | |
74 | 0x283ed59f1226dcefa7ff0ef87ceff5d5 | |
75 | 0x35a8e33503b3695be00528f8b82db931; | |
76 | 0xbe1f8593ee2c6f8f9497cc7335d97111 | |
77 | 0xc1a7bd3b4e853fc92d4e1588719986aa | |
78 | 3 | |
79 | 0x35a8e33503b3695be00528f8b82db931 | |
80 | 0x283ed59f1226dcefa7ff0ef87ceff5d5; | |
81 | 0x800000000000000000000000000000000000000c9 | |
432c4e18 | 82 | 4 |
83 | 1 | |
84 | 1 | |
85 | 0x20000000000000000000000000000000000000032; | |
86 | 0x800000000000000000000000000000000000000c9 | |
ceb3f0c0 | 87 | 0x3f0eba16286a2d57ea0991168d4994637e8343e36 |
88 | 1 | |
89 | 0xa17e704470d80cb5a78f295db0ce543dda16a169 | |
90 | 0x3c8c172e24598e90b9542e6b8f6571f54be572b50; | |
91 | } |