about summary refs log tree commit diff
path: root/test/pamarith.ok
blob: c9fc49dbf8e99c8a12a84be5663496f842daaa85 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
Test 1
P2
16 2
15
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
-add
P2 16 1 15 2 3 4 5 6 7 8 9 10 11 12 13 14 15 15 15  
1927712885 59
1927712885 59
1927712885 59
-subtract
P2 16 1 15 0 0 0 1 2 3 4 5 6 7 8 9 10 11 12 13  
622443613 59
622443613 59
622443613 59
-multiply
P2 16 1 15 0 0 0 0 1 1 1 1 1 1 1 1 2 2 2 2  
1589721418 59
1589721418 59
1589721418 59
-divide
P2 16 1 15 0 8 15 15 15 15 15 15 15 15 15 15 15 15 15 15  
321546811 59
321546811 59
321546811 59
-difference
P2 16 1 15 2 1 0 1 2 3 4 5 6 7 8 9 10 11 12 13  
590140907 59
590140907 59
590140907 59
-minimum
P2 16 1 15 0 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2  
3746423180 59
3746423180 59
3746423180 59
-maximum
P2 16 1 15 2 2 2 3 4 5 6 7 8 9 10 11 12 13 14 15  
201376294 59
201376294 59
201376294 59
-mean
P2 16 1 15 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9  
1456675831 59
1456675831 59
1456675831 59
-compare
P2 16 1 2 0 0 1 2 2 2 2 2 2 2 2 2 2 2 2 2  
196115582 58
196115582 58
196115582 58
-equal
P2 16 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0  
4168278327 58
4168278327 58
4168278327 58
-and
P2 16 1 15 0 0 2 2 0 0 2 2 0 0 2 2 0 0 2 2  
3660405045 59
3660405045 59
3660405045 59
-or
P2 16 1 15 2 3 2 3 6 7 6 7 10 11 10 11 14 15 14 15  
157317791 59
157317791 59
157317791 59
-nand
P2 16 1 15 15 15 13 13 15 15 13 13 15 15 13 13 15 15 13 13  
1625584307 59
1625584307 59
1625584307 59
-nor
P2 16 1 15 13 12 13 12 9 8 9 8 5 4 5 4 1 0 1 0  
3014218009 59
3014218009 59
3014218009 59
-xor
P2 16 1 15 2 3 0 1 6 7 4 5 10 11 8 9 14 15 12 13  
3227090877 59
3227090877 59
3227090877 59
-shiftleft
P2 16 1 15 0 4 8 12 0 4 8 12 0 4 8 12 0 4 8 12  
952940636 59
952940636 59
952940636 59
-shiftright
P2 16 1 15 0 0 0 0 1 1 1 1 2 2 2 2 3 3 3 3  
2898922266 59
2898922266 59
2898922266 59
Test 2 PBM
P1
8 2
01010101
00001111
-add
P1 8 1 00000101 
-subtract
P1 8 1 11110101 
-multiply
P1 8 1 01011111 
-divide
P1 8 1 01010000 
-difference
P1 8 1 10100101 
-minimum
P1 8 1 01011111 
-maximum
P1 8 1 00000101 
-mean
P1 8 1 00000101 
-compare
P2 8 1 2 1 0 1 0 2 1 2 1  
-equal
P1 8 1 01011010 
-and
P1 8 1 01011111 
-or
P1 8 1 00000101 
-nand
P1 8 1 10100000 
-nor
P1 8 1 11111010 
-xor
P1 8 1 10100101 
-shiftleft
P1 8 1 11110101 
-shiftright
P1 8 1 11110101 
Test 3
-add
2442291770 913
2442291770 913
2442291770 913
-multiply
3074858461 913
3074858461 913
3074858461 913
-difference
3788637303 913
3788637303 913
3788637303 913
-minimum
2046561746 913
2046561746 913
2046561746 913
-maximum
3724820523 913
3724820523 913
3724820523 913
-mean
5885382 913
5885382 913
5885382 913
-equal
780857755 911
780857755 911
780857755 911
-and
889537755 913
889537755 913
889537755 913
-or
2466056482 913
2466056482 913
2466056482 913
-nand
3743732043 913
3743732043 913
3743732043 913
-nor
2027723954 913
2027723954 913
2027723954 913
-xor
291709067 913
291709067 913
291709067 913
-subtract
3705429820 913
3705429820 913
-divide
2136905608 913
2136905608 913
-compare
1563790885 911
1563790885 911
-shiftleft
51480286 913
51480286 913
-shiftright
3072492814 913
3072492814 913
Test 4 (input = output)
Prints 281226646 481 five times, then 2921940274 59 five times
input image
281226646 481
-minimum
281226646 481
-maximum
281226646 481
-mean
281226646 481
-and
281226646 481
-or
281226646 481
input image
2921940274 59
-minimum
2921940274 59
-maximum
2921940274 59
-mean
2921940274 59
-and
2921940274 59
-or
2921940274 59
Test 5 (blank output)
Prints 2247801875 481 three times, then 320101399 59 three times
-subtract
2247801875 481
-difference
2247801875 481
-xor
2247801875 481
-subtract
320101399 59
-difference
320101399 59
-xor
320101399 59
Test Invalid
Expected failure 1 1
Expected failure 2 1
Expected failure 3 1
Expected failure 4 1
Expected failure 5 1
Expected failure 6 1
Expected failure 7 1
Expected failure 8 1
Expected failure 9 1
Expected failure 10 1
Expected failure 11 1
Expected failure 12 1
Expected failure 13 1
Expected failure 14 1
Expected failure 15 1
Expected failure 16 1
Expected failure 17 1
Expected failure 18 1
Expected failure 19 1
Expected failure 20 1
Expected failure 21 1
Expected failure 22 1
Expected failure 23 1
Expected failure 24 1
Expected failure 25 1
Expected failure 26 1
Expected failure 27 1
Expected failure 28 1
Expected failure 29 1
Expected failure 30 1
Expected failure 31 1
Expected failure 32 1
Expected failure 33 1
Expected failure 34 1
Expected failure 35 1
Expected failure 36 1
Expected failure 37 1
Expected failure 38 1
Expected failure 39 1
Expected failure 40 1
Expected failure 41 1
Expected failure 42 1