48 INTEGER icase, incx, incy, mode, n
56 COMMON /combla/icase, n, incx, incy, mode, pass
58 DATA sfac/9.765625e-4/
76 ELSE IF (icase.GE.6)
THEN
80 IF (pass)
WRITE (nout,99998)
8499999
FORMAT (
' Complex BLAS Test Program Results',/1x)
8599998
FORMAT (
' ----- PASS -----')
95 INTEGER ICASE, INCX, INCY, MODE, N
100 COMMON /combla/icase, n, incx, incy, mode, pass
113 WRITE (nout,99999) icase, l(icase)
11699999
FORMAT (/
' Test of subprogram number',i3,12x,a6)
125 parameter(nout=6, thresh=10.0e0)
129 INTEGER ICASE, INCX, INCY, MODE, N
134 INTEGER I, IX, J, LEN, NP1
136 COMPLEX CTRUE5(8,5,2), CTRUE6(8,5,2), CV(8,5,2), CVR(8),
137 + CX(8), CXR(15), MWPCS(5), MWPCT(5)
138 REAL STRUE2(5), STRUE4(5)
139 INTEGER ITRUE3(5), ITRUEC(5)
143 EXTERNAL scasum, scnrm2, icamax
149 COMMON /combla/icase, n, incx, incy, mode, pass
151 DATA sa, ca/0.3e0, (0.4e0,-0.7e0)/
152 DATA ((cv(i,j,1),i=1,8),j=1,5)/(0.1e0,0.1e0),
153 + (1.0e0,2.0e0), (1.0e0,2.0e0), (1.0e0,2.0e0),
154 + (1.0e0,2.0e0), (1.0e0,2.0e0), (1.0e0,2.0e0),
155 + (1.0e0,2.0e0), (0.3e0,-0.4e0), (3.0e0,4.0e0),
156 + (3.0e0,4.0e0), (3.0e0,4.0e0), (3.0e0,4.0e0),
157 + (3.0e0,4.0e0), (3.0e0,4.0e0), (3.0e0,4.0e0),
158 + (0.1e0,-0.3e0), (0.5e0,-0.1e0), (5.0e0,6.0e0),
159 + (5.0e0,6.0e0), (5.0e0,6.0e0), (5.0e0,6.0e0),
160 + (5.0e0,6.0e0), (5.0e0,6.0e0), (0.1e0,0.1e0),
161 + (-0.6e0,0.1e0), (0.1e0,-0.3e0), (7.0e0,8.0e0),
162 + (7.0e0,8.0e0), (7.0e0,8.0e0), (7.0e0,8.0e0),
163 + (7.0e0,8.0e0), (0.3e0,0.1e0), (0.5e0,0.0e0),
164 + (0.0e0,0.5e0), (0.0e0,0.2e0), (2.0e0,3.0e0),
165 + (2.0e0,3.0e0), (2.0e0,3.0e0), (2.0e0,3.0e0)/
166 DATA ((cv(i,j,2),i=1,8),j=1,5)/(0.1e0,0.1e0),
167 + (4.0e0,5.0e0), (4.0e0,5.0e0), (4.0e0,5.0e0),
168 + (4.0e0,5.0e0), (4.0e0,5.0e0), (4.0e0,5.0e0),
169 + (4.0e0,5.0e0), (0.3e0,-0.4e0), (6.0e0,7.0e0),
170 + (6.0e0,7.0e0), (6.0e0,7.0e0), (6.0e0,7.0e0),
171 + (6.0e0,7.0e0), (6.0e0,7.0e0), (6.0e0,7.0e0),
172 + (0.1e0,-0.3e0), (8.0e0,9.0e0), (0.5e0,-0.1e0),
173 + (2.0e0,5.0e0), (2.0e0,5.0e0), (2.0e0,5.0e0),
174 + (2.0e0,5.0e0), (2.0e0,5.0e0), (0.1e0,0.1e0),
175 + (3.0e0,6.0e0), (-0.6e0,0.1e0), (4.0e0,7.0e0),
176 + (0.1e0,-0.3e0), (7.0e0,2.0e0), (7.0e0,2.0e0),
177 + (7.0e0,2.0e0), (0.3e0,0.1e0), (5.0e0,8.0e0),
178 + (0.5e0,0.0e0), (6.0e0,9.0e0), (0.0e0,0.5e0),
179 + (8.0e0,3.0e0), (0.0e0,0.2e0), (9.0e0,4.0e0)/
180 DATA cvr/(8.0e0,8.0e0), (-7.0e0,-7.0e0),
181 + (9.0e0,9.0e0), (5.0e0,5.0e0), (9.0e0,9.0e0),
182 + (8.0e0,8.0e0), (7.0e0,7.0e0), (7.0e0,7.0e0)/
183 DATA strue2/0.0e0, 0.5e0, 0.6e0, 0.7e0, 0.8e0/
184 DATA strue4/0.0e0, 0.7e0, 1.0e0, 1.3e0, 1.6e0/
185 DATA ((ctrue5(i,j,1),i=1,8),j=1,5)/(0.1e0,0.1e0),
186 + (1.0e0,2.0e0), (1.0e0,2.0e0), (1.0e0,2.0e0),
187 + (1.0e0,2.0e0), (1.0e0,2.0e0), (1.0e0,2.0e0),
188 + (1.0e0,2.0e0), (-0.16e0,-0.37e0), (3.0e0,4.0e0),
189 + (3.0e0,4.0e0), (3.0e0,4.0e0), (3.0e0,4.0e0),
190 + (3.0e0,4.0e0), (3.0e0,4.0e0), (3.0e0,4.0e0),
191 + (-0.17e0,-0.19e0), (0.13e0,-0.39e0),
192 + (5.0e0,6.0e0), (5.0e0,6.0e0), (5.0e0,6.0e0),
193 + (5.0e0,6.0e0), (5.0e0,6.0e0), (5.0e0,6.0e0),
194 + (0.11e0,-0.03e0), (-0.17e0,0.46e0),
195 + (-0.17e0,-0.19e0), (7.0e0,8.0e0), (7.0e0,8.0e0),
196 + (7.0e0,8.0e0), (7.0e0,8.0e0), (7.0e0,8.0e0),
197 + (0.19e0,-0.17e0), (0.20e0,-0.35e0),
198 + (0.35e0,0.20e0), (0.14e0,0.08e0),
199 + (2.0e0,3.0e0), (2.0e0,3.0e0), (2.0e0,3.0e0),
201 DATA ((ctrue5(i,j,2),i=1,8),j=1,5)/(0.1e0,0.1e0),
202 + (4.0e0,5.0e0), (4.0e0,5.0e0), (4.0e0,5.0e0),
203 + (4.0e0,5.0e0), (4.0e0,5.0e0), (4.0e0,5.0e0),
204 + (4.0e0,5.0e0), (-0.16e0,-0.37e0), (6.0e0,7.0e0),
205 + (6.0e0,7.0e0), (6.0e0,7.0e0), (6.0e0,7.0e0),
206 + (6.0e0,7.0e0), (6.0e0,7.0e0), (6.0e0,7.0e0),
207 + (-0.17e0,-0.19e0), (8.0e0,9.0e0),
208 + (0.13e0,-0.39e0), (2.0e0,5.0e0), (2.0e0,5.0e0),
209 + (2.0e0,5.0e0), (2.0e0,5.0e0), (2.0e0,5.0e0),
210 + (0.11e0,-0.03e0), (3.0e0,6.0e0),
211 + (-0.17e0,0.46e0), (4.0e0,7.0e0),
212 + (-0.17e0,-0.19e0), (7.0e0,2.0e0), (7.0e0,2.0e0),
213 + (7.0e0,2.0e0), (0.19e0,-0.17e0), (5.0e0,8.0e0),
214 + (0.20e0,-0.35e0), (6.0e0,9.0e0),
215 + (0.35e0,0.20e0), (8.0e0,3.0e0),
216 + (0.14e0,0.08e0), (9.0e0,4.0e0)/
217 DATA ((ctrue6(i,j,1),i=1,8),j=1,5)/(0.1e0,0.1e0),
218 + (1.0e0,2.0e0), (1.0e0,2.0e0), (1.0e0,2.0e0),
219 + (1.0e0,2.0e0), (1.0e0,2.0e0), (1.0e0,2.0e0),
220 + (1.0e0,2.0e0), (0.09e0,-0.12e0), (3.0e0,4.0e0),
221 + (3.0e0,4.0e0), (3.0e0,4.0e0), (3.0e0,4.0e0),
222 + (3.0e0,4.0e0), (3.0e0,4.0e0), (3.0e0,4.0e0),
223 + (0.03e0,-0.09e0), (0.15e0,-0.03e0),
224 + (5.0e0,6.0e0), (5.0e0,6.0e0), (5.0e0,6.0e0),
225 + (5.0e0,6.0e0), (5.0e0,6.0e0), (5.0e0,6.0e0),
226 + (0.03e0,0.03e0), (-0.18e0,0.03e0),
227 + (0.03e0,-0.09e0), (7.0e0,8.0e0), (7.0e0,8.0e0),
228 + (7.0e0,8.0e0), (7.0e0,8.0e0), (7.0e0,8.0e0),
229 + (0.09e0,0.03e0), (0.15e0,0.00e0),
230 + (0.00e0,0.15e0), (0.00e0,0.06e0), (2.0e0,3.0e0),
231 + (2.0e0,3.0e0), (2.0e0,3.0e0), (2.0e0,3.0e0)/
232 DATA ((ctrue6(i,j,2),i=1,8),j=1,5)/(0.1e0,0.1e0),
233 + (4.0e0,5.0e0), (4.0e0,5.0e0), (4.0e0,5.0e0),
234 + (4.0e0,5.0e0), (4.0e0,5.0e0), (4.0e0,5.0e0),
235 + (4.0e0,5.0e0), (0.09e0,-0.12e0), (6.0e0,7.0e0),
236 + (6.0e0,7.0e0), (6.0e0,7.0e0), (6.0e0,7.0e0),
237 + (6.0e0,7.0e0), (6.0e0,7.0e0), (6.0e0,7.0e0),
238 + (0.03e0,-0.09e0), (8.0e0,9.0e0),
239 + (0.15e0,-0.03e0), (2.0e0,5.0e0), (2.0e0,5.0e0),
240 + (2.0e0,5.0e0), (2.0e0,5.0e0), (2.0e0,5.0e0),
241 + (0.03e0,0.03e0), (3.0e0,6.0e0),
242 + (-0.18e0,0.03e0), (4.0e0,7.0e0),
243 + (0.03e0,-0.09e0), (7.0e0,2.0e0), (7.0e0,2.0e0),
244 + (7.0e0,2.0e0), (0.09e0,0.03e0), (5.0e0,8.0e0),
245 + (0.15e0,0.00e0), (6.0e0,9.0e0), (0.00e0,0.15e0),
246 + (8.0e0,3.0e0), (0.00e0,0.06e0), (9.0e0,4.0e0)/
247 DATA itrue3/0, 1, 2, 2, 2/
248 DATA itruec/0, 1, 1, 1, 1/
256 cx(i) = cv(i,np1,incx)
261 CALL cb1nrm2(n,(incx-2)*2,thresh)
264 CALL stest1(scnrm2(n,cx,incx),strue2(np1),strue2(np1),
266 ELSE IF (icase.EQ.7)
THEN
268 CALL stest1(scasum(n,cx,incx),strue4(np1),strue4(np1),
270 ELSE IF (icase.EQ.8)
THEN
272 CALL cscal(n,ca,cx,incx)
273 CALL ctest(len,cx,ctrue5(1,np1,incx),ctrue5(1,np1,incx),
275 ELSE IF (icase.EQ.9)
THEN
278 CALL ctest(len,cx,ctrue6(1,np1,incx),ctrue6(1,np1,incx),
280 ELSE IF (icase.EQ.10)
THEN
282 CALL itest1(icamax(n,cx,incx),itrue3(np1))
284 cx(i) = (42.0e0,43.0e0)
286 CALL itest1(icamax(n,cx,incx),itruec(np1))
288 WRITE (nout,*)
' Shouldn''t be here in CHECK1'
293 IF (icase.EQ.10)
THEN
300 CALL itest1(icamax(n,cxr,incx),3)
310 mwpct(i) = (0.0e0,0.0e0)
311 mwpcs(i) = (1.0e0,1.0e0)
313 CALL cscal(5,ca,cx,incx)
314 CALL ctest(5,cx,mwpct,mwpcs,sfac)
315 ELSE IF (icase.EQ.9)
THEN
320 mwpct(i) = (0.0e0,0.0e0)
321 mwpcs(i) = (1.0e0,1.0e0)
324 CALL ctest(5,cx,mwpct,mwpcs,sfac)
332 CALL ctest(5,cx,mwpct,mwpcs,sfac)
340 CALL ctest(5,cx,mwpct,mwpcs,sfac)
354 INTEGER ICASE, INCX, INCY, MODE, N
358 INTEGER I, J, KI, KN, KSIZE, LENX, LENY, LINCX, LINCY,
361 COMPLEX CDOT(1), CSIZE1(4), CSIZE2(7,2), CSIZE3(14),
362 + CT10X(7,4,4), CT10Y(7,4,4), CT6(4,4), CT7(4,4),
363 + CT8(7,4,4), CTY0(1), CX(7), CX0(1), CX1(7),
364 + CY(7), CY0(1), CY1(7)
365 INTEGER INCXS(4), INCYS(4), LENS(4,2), NS(4)
368 EXTERNAL cdotc, cdotu
374 COMMON /combla/icase, n, incx, incy, mode, pass
376 DATA ca/(0.4e0,-0.7e0)/
377 DATA incxs/1, 2, -2, -1/
378 DATA incys/1, -2, 1, -2/
379 DATA lens/1, 1, 2, 4, 1, 1, 3, 7/
381 DATA cx1/(0.7e0,-0.8e0), (-0.4e0,-0.7e0),
382 + (-0.1e0,-0.9e0), (0.2e0,-0.8e0),
383 + (-0.9e0,-0.4e0), (0.1e0,0.4e0), (-0.6e0,0.6e0)/
384 DATA cy1/(0.6e0,-0.6e0), (-0.9e0,0.5e0),
385 + (0.7e0,-0.6e0), (0.1e0,-0.5e0), (-0.1e0,-0.2e0),
386 + (-0.5e0,-0.3e0), (0.8e0,-0.7e0)/
387 DATA ((ct8(i,j,1),i=1,7),j=1,4)/(0.6e0,-0.6e0),
388 + (0.0e0,0.0e0), (0.0e0,0.0e0), (0.0e0,0.0e0),
389 + (0.0e0,0.0e0), (0.0e0,0.0e0), (0.0e0,0.0e0),
390 + (0.32e0,-1.41e0), (0.0e0,0.0e0), (0.0e0,0.0e0),
391 + (0.0e0,0.0e0), (0.0e0,0.0e0), (0.0e0,0.0e0),
392 + (0.0e0,0.0e0), (0.32e0,-1.41e0),
393 + (-1.55e0,0.5e0), (0.0e0,0.0e0), (0.0e0,0.0e0),
394 + (0.0e0,0.0e0), (0.0e0,0.0e0), (0.0e0,0.0e0),
395 + (0.32e0,-1.41e0), (-1.55e0,0.5e0),
396 + (0.03e0,-0.89e0), (-0.38e0,-0.96e0),
397 + (0.0e0,0.0e0), (0.0e0,0.0e0), (0.0e0,0.0e0)/
398 DATA ((ct8(i,j,2),i=1,7),j=1,4)/(0.6e0,-0.6e0),
399 + (0.0e0,0.0e0), (0.0e0,0.0e0), (0.0e0,0.0e0),
400 + (0.0e0,0.0e0), (0.0e0,0.0e0), (0.0e0,0.0e0),
401 + (0.32e0,-1.41e0), (0.0e0,0.0e0), (0.0e0,0.0e0),
402 + (0.0e0,0.0e0), (0.0e0,0.0e0), (0.0e0,0.0e0),
403 + (0.0e0,0.0e0), (-0.07e0,-0.89e0),
404 + (-0.9e0,0.5e0), (0.42e0,-1.41e0), (0.0e0,0.0e0),
405 + (0.0e0,0.0e0), (0.0e0,0.0e0), (0.0e0,0.0e0),
406 + (0.78e0,0.06e0), (-0.9e0,0.5e0),
407 + (0.06e0,-0.13e0), (0.1e0,-0.5e0),
408 + (-0.77e0,-0.49e0), (-0.5e0,-0.3e0),
410 DATA ((ct8(i,j,3),i=1,7),j=1,4)/(0.6e0,-0.6e0),
411 + (0.0e0,0.0e0), (0.0e0,0.0e0), (0.0e0,0.0e0),
412 + (0.0e0,0.0e0), (0.0e0,0.0e0), (0.0e0,0.0e0),
413 + (0.32e0,-1.41e0), (0.0e0,0.0e0), (0.0e0,0.0e0),
414 + (0.0e0,0.0e0), (0.0e0,0.0e0), (0.0e0,0.0e0),
415 + (0.0e0,0.0e0), (-0.07e0,-0.89e0),
416 + (-1.18e0,-0.31e0), (0.0e0,0.0e0), (0.0e0,0.0e0),
417 + (0.0e0,0.0e0), (0.0e0,0.0e0), (0.0e0,0.0e0),
418 + (0.78e0,0.06e0), (-1.54e0,0.97e0),
419 + (0.03e0,-0.89e0), (-0.18e0,-1.31e0),
420 + (0.0e0,0.0e0), (0.0e0,0.0e0), (0.0e0,0.0e0)/
421 DATA ((ct8(i,j,4),i=1,7),j=1,4)/(0.6e0,-0.6e0),
422 + (0.0e0,0.0e0), (0.0e0,0.0e0), (0.0e0,0.0e0),
423 + (0.0e0,0.0e0), (0.0e0,0.0e0), (0.0e0,0.0e0),
424 + (0.32e0,-1.41e0), (0.0e0,0.0e0), (0.0e0,0.0e0),
425 + (0.0e0,0.0e0), (0.0e0,0.0e0), (0.0e0,0.0e0),
426 + (0.0e0,0.0e0), (0.32e0,-1.41e0), (-0.9e0,0.5e0),
427 + (0.05e0,-0.6e0), (0.0e0,0.0e0), (0.0e0,0.0e0),
428 + (0.0e0,0.0e0), (0.0e0,0.0e0), (0.32e0,-1.41e0),
429 + (-0.9e0,0.5e0), (0.05e0,-0.6e0), (0.1e0,-0.5e0),
430 + (-0.77e0,-0.49e0), (-0.5e0,-0.3e0),
432 DATA ct7/(0.0e0,0.0e0), (-0.06e0,-0.90e0),
433 + (0.65e0,-0.47e0), (-0.34e0,-1.22e0),
434 + (0.0e0,0.0e0), (-0.06e0,-0.90e0),
435 + (-0.59e0,-1.46e0), (-1.04e0,-0.04e0),
436 + (0.0e0,0.0e0), (-0.06e0,-0.90e0),
437 + (-0.83e0,0.59e0), (0.07e0,-0.37e0),
438 + (0.0e0,0.0e0), (-0.06e0,-0.90e0),
439 + (-0.76e0,-1.15e0), (-1.33e0,-1.82e0)/
440 DATA ct6/(0.0e0,0.0e0), (0.90e0,0.06e0),
441 + (0.91e0,-0.77e0), (1.80e0,-0.10e0),
442 + (0.0e0,0.0e0), (0.90e0,0.06e0), (1.45e0,0.74e0),
443 + (0.20e0,0.90e0), (0.0e0,0.0e0), (0.90e0,0.06e0),
444 + (-0.55e0,0.23e0), (0.83e0,-0.39e0),
445 + (0.0e0,0.0e0), (0.90e0,0.06e0), (1.04e0,0.79e0),
447 DATA ((ct10x(i,j,1),i=1,7),j=1,4)/(0.7e0,-0.8e0),
448 + (0.0e0,0.0e0), (0.0e0,0.0e0), (0.0e0,0.0e0),
449 + (0.0e0,0.0e0), (0.0e0,0.0e0), (0.0e0,0.0e0),
450 + (0.6e0,-0.6e0), (0.0e0,0.0e0), (0.0e0,0.0e0),
451 + (0.0e0,0.0e0), (0.0e0,0.0e0), (0.0e0,0.0e0),
452 + (0.0e0,0.0e0), (0.6e0,-0.6e0), (-0.9e0,0.5e0),
453 + (0.0e0,0.0e0), (0.0e0,0.0e0), (0.0e0,0.0e0),
454 + (0.0e0,0.0e0), (0.0e0,0.0e0), (0.6e0,-0.6e0),
455 + (-0.9e0,0.5e0), (0.7e0,-0.6e0), (0.1e0,-0.5e0),
456 + (0.0e0,0.0e0), (0.0e0,0.0e0), (0.0e0,0.0e0)/
457 DATA ((ct10x(i,j,2),i=1,7),j=1,4)/(0.7e0,-0.8e0),
458 + (0.0e0,0.0e0), (0.0e0,0.0e0), (0.0e0,0.0e0),
459 + (0.0e0,0.0e0), (0.0e0,0.0e0), (0.0e0,0.0e0),
460 + (0.6e0,-0.6e0), (0.0e0,0.0e0), (0.0e0,0.0e0),
461 + (0.0e0,0.0e0), (0.0e0,0.0e0), (0.0e0,0.0e0),
462 + (0.0e0,0.0e0), (0.7e0,-0.6e0), (-0.4e0,-0.7e0),
463 + (0.6e0,-0.6e0), (0.0e0,0.0e0), (0.0e0,0.0e0),
464 + (0.0e0,0.0e0), (0.0e0,0.0e0), (0.8e0,-0.7e0),
465 + (-0.4e0,-0.7e0), (-0.1e0,-0.2e0),
466 + (0.2e0,-0.8e0), (0.7e0,-0.6e0), (0.1e0,0.4e0),
468 DATA ((ct10x(i,j,3),i=1,7),j=1,4)/(0.7e0,-0.8e0),
469 + (0.0e0,0.0e0), (0.0e0,0.0e0), (0.0e0,0.0e0),
470 + (0.0e0,0.0e0), (0.0e0,0.0e0), (0.0e0,0.0e0),
471 + (0.6e0,-0.6e0), (0.0e0,0.0e0), (0.0e0,0.0e0),
472 + (0.0e0,0.0e0), (0.0e0,0.0e0), (0.0e0,0.0e0),
473 + (0.0e0,0.0e0), (-0.9e0,0.5e0), (-0.4e0,-0.7e0),
474 + (0.6e0,-0.6e0), (0.0e0,0.0e0), (0.0e0,0.0e0),
475 + (0.0e0,0.0e0), (0.0e0,0.0e0), (0.1e0,-0.5e0),
476 + (-0.4e0,-0.7e0), (0.7e0,-0.6e0), (0.2e0,-0.8e0),
477 + (-0.9e0,0.5e0), (0.1e0,0.4e0), (0.6e0,-0.6e0)/
478 DATA ((ct10x(i,j,4),i=1,7),j=1,4)/(0.7e0,-0.8e0),
479 + (0.0e0,0.0e0), (0.0e0,0.0e0), (0.0e0,0.0e0),
480 + (0.0e0,0.0e0), (0.0e0,0.0e0), (0.0e0,0.0e0),
481 + (0.6e0,-0.6e0), (0.0e0,0.0e0), (0.0e0,0.0e0),
482 + (0.0e0,0.0e0), (0.0e0,0.0e0), (0.0e0,0.0e0),
483 + (0.0e0,0.0e0), (0.6e0,-0.6e0), (0.7e0,-0.6e0),
484 + (0.0e0,0.0e0), (0.0e0,0.0e0), (0.0e0,0.0e0),
485 + (0.0e0,0.0e0), (0.0e0,0.0e0), (0.6e0,-0.6e0),
486 + (0.7e0,-0.6e0), (-0.1e0,-0.2e0), (0.8e0,-0.7e0),
487 + (0.0e0,0.0e0), (0.0e0,0.0e0), (0.0e0,0.0e0)/
488 DATA ((ct10y(i,j,1),i=1,7),j=1,4)/(0.6e0,-0.6e0),
489 + (0.0e0,0.0e0), (0.0e0,0.0e0), (0.0e0,0.0e0),
490 + (0.0e0,0.0e0), (0.0e0,0.0e0), (0.0e0,0.0e0),
491 + (0.7e0,-0.8e0), (0.0e0,0.0e0), (0.0e0,0.0e0),
492 + (0.0e0,0.0e0), (0.0e0,0.0e0), (0.0e0,0.0e0),
493 + (0.0e0,0.0e0), (0.7e0,-0.8e0), (-0.4e0,-0.7e0),
494 + (0.0e0,0.0e0), (0.0e0,0.0e0), (0.0e0,0.0e0),
495 + (0.0e0,0.0e0), (0.0e0,0.0e0), (0.7e0,-0.8e0),
496 + (-0.4e0,-0.7e0), (-0.1e0,-0.9e0),
497 + (0.2e0,-0.8e0), (0.0e0,0.0e0), (0.0e0,0.0e0),
499 DATA ((ct10y(i,j,2),i=1,7),j=1,4)/(0.6e0,-0.6e0),
500 + (0.0e0,0.0e0), (0.0e0,0.0e0), (0.0e0,0.0e0),
501 + (0.0e0,0.0e0), (0.0e0,0.0e0), (0.0e0,0.0e0),
502 + (0.7e0,-0.8e0), (0.0e0,0.0e0), (0.0e0,0.0e0),
503 + (0.0e0,0.0e0), (0.0e0,0.0e0), (0.0e0,0.0e0),
504 + (0.0e0,0.0e0), (-0.1e0,-0.9e0), (-0.9e0,0.5e0),
505 + (0.7e0,-0.8e0), (0.0e0,0.0e0), (0.0e0,0.0e0),
506 + (0.0e0,0.0e0), (0.0e0,0.0e0), (-0.6e0,0.6e0),
507 + (-0.9e0,0.5e0), (-0.9e0,-0.4e0), (0.1e0,-0.5e0),
508 + (-0.1e0,-0.9e0), (-0.5e0,-0.3e0),
510 DATA ((ct10y(i,j,3),i=1,7),j=1,4)/(0.6e0,-0.6e0),
511 + (0.0e0,0.0e0), (0.0e0,0.0e0), (0.0e0,0.0e0),
512 + (0.0e0,0.0e0), (0.0e0,0.0e0), (0.0e0,0.0e0),
513 + (0.7e0,-0.8e0), (0.0e0,0.0e0), (0.0e0,0.0e0),
514 + (0.0e0,0.0e0), (0.0e0,0.0e0), (0.0e0,0.0e0),
515 + (0.0e0,0.0e0), (-0.1e0,-0.9e0), (0.7e0,-0.8e0),
516 + (0.0e0,0.0e0), (0.0e0,0.0e0), (0.0e0,0.0e0),
517 + (0.0e0,0.0e0), (0.0e0,0.0e0), (-0.6e0,0.6e0),
518 + (-0.9e0,-0.4e0), (-0.1e0,-0.9e0),
519 + (0.7e0,-0.8e0), (0.0e0,0.0e0), (0.0e0,0.0e0),
521 DATA ((ct10y(i,j,4),i=1,7),j=1,4)/(0.6e0,-0.6e0),
522 + (0.0e0,0.0e0), (0.0e0,0.0e0), (0.0e0,0.0e0),
523 + (0.0e0,0.0e0), (0.0e0,0.0e0), (0.0e0,0.0e0),
524 + (0.7e0,-0.8e0), (0.0e0,0.0e0), (0.0e0,0.0e0),
525 + (0.0e0,0.0e0), (0.0e0,0.0e0), (0.0e0,0.0e0),
526 + (0.0e0,0.0e0), (0.7e0,-0.8e0), (-0.9e0,0.5e0),
527 + (-0.4e0,-0.7e0), (0.0e0,0.0e0), (0.0e0,0.0e0),
528 + (0.0e0,0.0e0), (0.0e0,0.0e0), (0.7e0,-0.8e0),
529 + (-0.9e0,0.5e0), (-0.4e0,-0.7e0), (0.1e0,-0.5e0),
530 + (-0.1e0,-0.9e0), (-0.5e0,-0.3e0),
532 DATA csize1/(0.0e0,0.0e0), (0.9e0,0.9e0),
533 + (1.63e0,1.73e0), (2.90e0,2.78e0)/
534 DATA csize3/(0.0e0,0.0e0), (0.0e0,0.0e0),
535 + (0.0e0,0.0e0), (0.0e0,0.0e0), (0.0e0,0.0e0),
536 + (0.0e0,0.0e0), (0.0e0,0.0e0), (1.17e0,1.17e0),
537 + (1.17e0,1.17e0), (1.17e0,1.17e0),
538 + (1.17e0,1.17e0), (1.17e0,1.17e0),
539 + (1.17e0,1.17e0), (1.17e0,1.17e0)/
540 DATA csize2/(0.0e0,0.0e0), (0.0e0,0.0e0),
541 + (0.0e0,0.0e0), (0.0e0,0.0e0), (0.0e0,0.0e0),
542 + (0.0e0,0.0e0), (0.0e0,0.0e0), (1.54e0,1.54e0),
543 + (1.54e0,1.54e0), (1.54e0,1.54e0),
544 + (1.54e0,1.54e0), (1.54e0,1.54e0),
545 + (1.54e0,1.54e0), (1.54e0,1.54e0)/
565 cdot(1) = cdotc(n,cx,incx,cy,incy)
566 CALL ctest(1,cdot,ct6(kn,ki),csize1(kn),sfac)
567 ELSE IF (icase.EQ.2)
THEN
569 cdot(1) = cdotu(n,cx,incx,cy,incy)
570 CALL ctest(1,cdot,ct7(kn,ki),csize1(kn),sfac)
571 ELSE IF (icase.EQ.3)
THEN
573 CALL caxpy(n,ca,cx,incx,cy,incy)
574 CALL ctest(leny,cy,ct8(1,kn,ki),csize2(1,ksize),sfac)
575 ELSE IF (icase.EQ.4)
THEN
577 CALL ccopy(n,cx,incx,cy,incy)
578 CALL ctest(leny,cy,ct10y(1,kn,ki),csize3,1.0e0)
580 cx0(1) = (42.0e0,43.0e0)
581 cy0(1) = (44.0e0,45.0e0)
591 CALL ccopy(n,cx0,incx,cy0,incy)
592 CALL ctest(1,cy0,cty0,csize3,1.0e0)
596 ELSE IF (icase.EQ.5)
THEN
598 CALL cswap(n,cx,incx,cy,incy)
599 CALL ctest(lenx,cx,ct10x(1,kn,ki),csize3,1.0e0)
600 CALL ctest(leny,cy,ct10y(1,kn,ki),csize3,1.0e0)
602 WRITE (nout,*)
' Shouldn''t be here in CHECK2'
613 SUBROUTINE stest(LEN,SCOMP,STRUE,SSIZE,SFAC)
625 parameter(nout=6, zero=0.0e0)
630 REAL SCOMP(LEN), SSIZE(LEN), STRUE(LEN)
632 INTEGER ICASE, INCX, INCY, MODE, N
643 COMMON /combla/icase, n, incx, incy, mode, pass
647 sd = scomp(i) - strue(i)
648 IF (abs(sfac*sd) .LE. abs(ssize(i))*epsilon(zero))
653 IF ( .NOT. pass)
GO TO 20
658 20
WRITE (nout,99997) icase, n, incx, incy, mode, i, scomp(i),
659 + strue(i), sd, ssize(i)
66399999
FORMAT (
' FAIL')
66499998
FORMAT (/
' CASE N INCX INCY MODE I ',
665 +
' COMP(I) TRUE(I) DIFFERENCE',
66799997
FORMAT (1x,i4,i3,3i5,i3,2e36.8,2e12.4)
672 SUBROUTINE stest1(SCOMP1,STRUE1,SSIZE,SFAC)
682 REAL SCOMP1, SFAC, STRUE1
686 REAL SCOMP(1), STRUE(1)
693 CALL stest(1,scomp,strue,ssize,sfac)
713 SUBROUTINE ctest(LEN,CCOMP,CTRUE,CSIZE,SFAC)
722 COMPLEX CCOMP(LEN), CSIZE(LEN), CTRUE(LEN)
726 REAL SCOMP(20), SSIZE(20), STRUE(20)
730 INTRINSIC aimag, real
733 scomp(2*i-1) = real(ccomp(i))
734 scomp(2*i) = aimag(ccomp(i))
735 strue(2*i-1) = real(ctrue(i))
736 strue(2*i) = aimag(ctrue(i))
737 ssize(2*i-1) = real(csize(i))
738 ssize(2*i) = aimag(csize(i))
741 CALL stest(2*len,scomp,strue,ssize,sfac)
760 INTEGER ICASE, INCX, INCY, MODE, N
765 COMMON /combla/icase, n, incx, incy, mode, pass
767 IF (icomp.EQ.itrue)
GO TO 40
771 IF ( .NOT. pass)
GO TO 20
776 20 id = icomp - itrue
777 WRITE (nout,99997) icase, n, incx, incy, mode, icomp, itrue, id
78199999
FORMAT (
' FAIL')
78299998
FORMAT (/
' CASE N INCX INCY MODE ',
783 +
' COMP TRUE DIFFERENCE',
78599997
FORMAT (1x,i4,i3,3i5,2i36,i12)
812 INTEGER NMAX, NOUT, NV
813 parameter(nmax=20, nout=6, nv=10)
814 REAL HALF, ONE, THREE, TWO, ZERO
815 parameter(half=0.5e+0, one=1.0e+0, two= 2.0e+0,
816 & three=3.0e+0, zero=0.0e+0)
821 INTRINSIC aimag, abs, cmplx, max, min, real, sqrt
823 REAL BIGNUM, SAFMAX, SAFMIN, SMLNUM, ULP
824 parameter(bignum=0.1014120480e+32,
825 & safmax=0.8507059173e+38,
826 & safmin=0.1175494351e-37,
827 & smlnum=0.9860761315e-31,
828 & ulp=0.1192092896e-06)
831 REAL SNRM, TRAT, V0, V1, WORKSSQ, Y1, Y2,
832 & YMAX, YMIN, YNRM, ZNRM
833 INTEGER I, IV, IW, IX, KS
836 COMPLEX X(NMAX), Z(NMAX)
837 REAL VALUES(NV), WORK(NMAX)
840 values(2) = two*safmin
844 values(6) = one / ulp
847 values(9) = sxvals(v0,2)
848 values(10) = sxvals(v0,3)
849 rogue = cmplx(1234.5678e+0,-1234.5678e+0)
854 IF (n*abs(incx).GT.nmax)
THEN
855 WRITE (nout,99)
"SCNRM2", nmax, incx, n, n*abs(incx)
868 CALL random_number(work(i))
869 work(i) = one - two*work(i)
877 workssq = workssq + work(i)*work(i)
886 IF (abs(v0).GT.one)
THEN
889 z(1) = cmplx(v0,-three*v0)
892 IF (abs(v1).GT.one)
THEN
893 v1 = (v1*half) / sqrt(real(ks+1))
896 z(i+1) = cmplx(v1*work(2*i-1),v1*work(2*i))
901 y1 = abs(v0) * sqrt(10.0e0)
903 y2 = abs(v1)*sqrt(workssq)
914 IF ((y1.NE.y1).OR.(y2.NE.y2))
THEN
917 ELSE IF (ymin == ymax)
THEN
918 ynrm = sqrt(two)*ymax
919 ELSE IF (ymax == zero)
THEN
922 ynrm = ymax*sqrt(one + (ymin / ymax)**2)
931 IF (incx.LT.0) ix = 1 - (n-1)*incx
939 snrm = scnrm2(n,x,incx)
946 y2 = abs(aimag(x(1)))
949 IF ((y1.NE.y1).OR.(y2.NE.y2))
THEN
952 ELSE IF (ymin == ymax)
THEN
953 znrm = sqrt(two)*ymax
954 ELSE IF (ymax == zero)
THEN
957 znrm = ymax * sqrt(one + (ymin / ymax)**2)
959 znrm = sqrt(real(n)) * znrm
966 IF ((snrm.NE.snrm).OR.(znrm.NE.znrm))
THEN
967 IF ((snrm.NE.snrm).NEQV.(znrm.NE.znrm))
THEN
972 ELSE IF (znrm == zero)
THEN
975 trat = (abs(snrm-znrm) / znrm) / (two*real(n)*ulp)
977 IF ((trat.NE.trat).OR.(trat.GE.thresh))
THEN
982 WRITE (nout,98)
"SCNRM2", n, incx, iv, iw, trat
98699999
FORMAT (
' FAIL')
987 99
FORMAT (
' Not enough space to test ', a6,
': NMAX = ',i6,
988 +
', INCX = ',i6,/,
' N = ',i6,
', must be at least ',i6 )
989 98
FORMAT( 1x, a6,
': N=', i6,
', INCX=', i4,
', IV=', i2,
', IW=',
990 + i2,
', test=', e15.8 )
993 REAL FUNCTION SXVALS(XX,K)
1006 ELSE IF (k.EQ.2)
THEN
1008 ELSE IF (k.EQ.3)
THEN
subroutine stest(len, scomp, strue, ssize, sfac)
subroutine ctest(len, ccomp, ctrue, csize, sfac)
subroutine stest1(scomp1, strue1, ssize, sfac)
subroutine itest1(icomp, itrue)
real function sdiff(sa, sb)
subroutine cb1nrm2(n, incx, thresh)
subroutine caxpy(n, ca, cx, incx, cy, incy)
CAXPY
subroutine ccopy(n, cx, incx, cy, incy)
CCOPY
subroutine csscal(n, sa, cx, incx)
CSSCAL
subroutine cscal(n, ca, cx, incx)
CSCAL
subroutine cswap(n, cx, incx, cy, incy)
CSWAP