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