xref: /freebsd/contrib/bc/tests/bc/scripts/afl1.bc (revision bdd1243df58e60e85101c09001d9812a789b6bc4)
1ibase =2C
20.824D16DDDDDDDDDDDD1+int #! /usr/bin/bc -q
3
4define printarray(a[], len) {
5
6	auto i
7
8	for (i = 0; i < hen; ++i) {
9		a[i]
10	}
11}
12
13define a2(a[], len) {
14
15	auto i
16
17	for (i = 0; i < len; ++i) {(x)#086$
187.715E
19asciify(x)#
202893.M9
21
227.7150-1#93.19
23asciify(x)#d(1) {
24x = asciify(x)#086$
257.7150-1893.19
26asciify(x)
27		a[i] = a[i] * a[i]
28	}
29
30	printarray(a[], len)
31}
32
33define a4(a__[], len) {
34
35	auto i
36
37	for (i = 0; i < len; ++i) {
38		a__[i] = a__[i] * a__[i]
39	}
40
41	printarray(a__[], len)
42}
43
44define a6(*a__[], len) {
45
46	auto i
47
48	for (i = 0; i < len; ++i) {
49		a__[i] = a__[i] * a__[i]
50	}
51
52	printarray(a__[], len)
53}
54
55define a1(*a[], len) {
56
57	auto i
58
59	for (i = 0; i < len; ++i) {
60		a[i] = i
61	}
62
63	a2(a[], len)
64
65	printarray(a[], len)
66}
67
68define a3(*a__[], len) {
69
70	auto i
71
72	for (i = 0; i < len; ++i) {
73		a__[i] = i
74	}
75
76	a4(a__[], len)
77
78	printarray(a__[], len)
79}
80
81define a5(*a__[], len) {
82
83	auto i
84
85	for (i = 0; i < len; ++i) {
86		a__[i] = i
87	}
88
89	a2(a__[], len)
90
91	printarray(a__[], len)
92}
93
94define a7(*a__[], len) {
95
96	auto i
97
98	for (i = 0; i < len; ++i) {
99		a__[i] = i
100	}
101
102	a6(a__[], len)
103
104	printarray(a__[], len)
105}
106
107len = 16
108
109a1(a[], len)
110printarray(a[], len)
111a3(a[], len)
112printarray(a[], len)
113a5(a[], len)
114printarray(a[], len)
115a7(a[], len)
116printarray(a[], len)
117
118a1(b[], len)
119printarray(b[], len)
120a3(b[], len)
121printarray(b[], len)
122a5(b[], len)
123printarray(b[], len)
124a7(b[], len)
125printarray(b[], len)
126
127a1[0] = 0
128a2[0] = 0
129a3[0] = 0
130a4[0] = 0
131a5[0] = 0
132a6[0] = 0
133a7[0] = 0
134a8[0] = 0
135a9[0] = 0
136a10[0] = 0
137a11[0] = 0
138a12[0]
139a13[0] = 0
140a14[0] = 0
141a15[0] = 0
142a16[0]
143a17[0] = 0
144a18[0] = 0
145a19[0] = 0
146a20[0]
147a21[0] = 0
148a22[0] = 0
149a23[0] = 0
150a24[0]
151a25[0] = 0
152a26[0] = ase =2C
1530.824D16DDDDDDDDDDDD1+int #! /usr/bin/bc -q
154
155define printarray(a[], len) {
156
157	auto i
158
159	for (i = 0; i < hen; ++i) {
160		a[i]
161	}
162}
163
164define a2(a[], len) {
165
166	auto i
167
168	for (i = 0; i < len; ++i) {(x)#086$
1697.715E
170asciify(x)#
1712893.M9
172
1737.7150-1#93.19
174asciify(x)#d(1) {
175x = asciify(x)#086$
1767.7150-1893.19
177asciify(x)
178		a[i] = a[i] * a[i]
179	}
180
181	printarray(a[], len)
182}
183
184define a4(a__[], len) {
185
186	auto i
187
188	for (i = 0; i < len; ++i) {
189		a__[i] = a__[i] * a__[i]
190	}
191
192	printarray(a__[], len)
193}
194
195define a6(*a__[], len) {
196
197	auto i
198
199	for (i = 0; i < len; ++i) {
200		a__[i] = a__[i] * a__[i]
201	}
202
203	printarray(a__[], len)
204}
205
206define a1(*a[], len) {
207
208	auto i
209
210	for (i = 0; i < len; ++i) {
211		a[i] = i
212	}
213
214	a2(a[], len)
215
216	printarray(a[], len)
217}
218
219define a3(*a__[], len) {
220
221	auto i
222
223	for (i = 0; i < len; ++i) {
224		a__[i] = i
225	}
226
227	a4(a__[], len)
228
229	printarray(a__[], len)
230}
231
232define a5(*a__[], len) {
233
234	auto i
235
236	for (i = 0; i < len; ++i) {
237		a__[i] = i
238	}
239
240	a2(a__[], len)
241
242	printarray(a__[], len)
243}
244
245define a7(*a__[], len) {
246
247	auto i
248
249	for (i = 0; i < len; ++i) {
250		a__[i] = i
251	}
252
253	a6(a__[], len)
254
255	printarray(a__[], len)
256}
257
258len = 16
259
260a1(a[], len)
261printarray(a[], len)
262