48 INTEGER icase, incx, incy, n
56 COMMON /combla/icase, n, incx, incy, pass
58 DATA sfac/9.765625e-4/
73 IF (icase.EQ.3 .OR. icase.EQ.11)
THEN
75 ELSE IF (icase.EQ.7 .OR. icase.EQ.8 .OR. icase.EQ.9 .OR.
78 ELSE IF (icase.EQ.1 .OR. icase.EQ.2 .OR. icase.EQ.5 .OR.
79 + icase.EQ.6 .OR. icase.EQ.12 .OR. icase.EQ.13)
THEN
81 ELSE IF (icase.EQ.4)
THEN
85 IF (pass)
WRITE (nout,99998)
8999999
FORMAT (
' Real BLAS Test Program Results',/1x)
9099998
FORMAT (
' ----- PASS -----')
100 INTEGER ICASE, INCX, INCY, N
105 COMMON /combla/icase, n, incx, incy, pass
121 WRITE (nout,99999) icase, l(icase)
12499999
FORMAT (/
' Test of subprogram number',i3,12x,a6)
136 INTEGER ICASE, INCX, INCY, N
139 REAL D12, SA, SB, SC, SS
142 REAL DA1(8), DATRUE(8), DB1(8), DBTRUE(8), DC1(8),
143 + DS1(8), DAB(4,9), DTEMP(9), DTRUE(9,9)
147 COMMON /combla/icase, n, incx, incy, pass
149 DATA da1/0.3e0, 0.4e0, -0.3e0, -0.4e0, -0.3e0, 0.0e0,
151 DATA db1/0.4e0, 0.3e0, 0.4e0, 0.3e0, -0.4e0, 0.0e0,
153 DATA dc1/0.6e0, 0.8e0, -0.6e0, 0.8e0, 0.6e0, 1.0e0,
155 DATA ds1/0.8e0, 0.6e0, 0.8e0, -0.6e0, 0.8e0, 0.0e0,
157 DATA datrue/0.5e0, 0.5e0, 0.5e0, -0.5e0, -0.5e0,
158 + 0.0e0, 1.0e0, 1.0e0/
159 DATA dbtrue/0.0e0, 0.6e0, 0.0e0, -0.6e0, 0.0e0,
160 + 0.0e0, 1.0e0, 0.0e0/
162 DATA dab/ .1e0,.3e0,1.2e0,.2e0,
163 a .7e0, .2e0, .6e0, 4.2e0,
164 b 0.e0,0.e0,0.e0,0.e0,
165 c 4.e0, -1.e0, 2.e0, 4.e0,
166 d 6.e-10, 2.e-2, 1.e5, 10.e0,
167 e 4.e10, 2.e-2, 1.e-5, 10.e0,
168 f 2.e-10, 4.e-2, 1.e5, 10.e0,
169 g 2.e10, 4.e-2, 1.e-5, 10.e0,
170 h 4.e0, -2.e0, 8.e0, 4.e0 /
172 DATA dtrue/0.e0,0.e0, 1.3e0, .2e0, 0.e0,0.e0,0.e0, .5e0, 0.e0,
173 a 0.e0,0.e0, 4.5e0, 4.2e0, 1.e0, .5e0, 0.e0,0.e0,0.e0,
174 b 0.e0,0.e0,0.e0,0.e0, -2.e0, 0.e0,0.e0,0.e0,0.e0,
175 c 0.e0,0.e0,0.e0, 4.e0, -1.e0, 0.e0,0.e0,0.e0,0.e0,
176 d 0.e0, 15.e-3, 0.e0, 10.e0, -1.e0, 0.e0, -1.e-4,
178 f 0.e0,0.e0, 6144.e-5, 10.e0, -1.e0, 4096.e0, -1.e6,
180 h 0.e0,0.e0,15.e0,10.e0,-1.e0, 5.e-5, 0.e0,1.e0,0.e0,
181 i 0.e0,0.e0, 15.e0, 10.e0, -1. e0, 5.e5, -4096.e0,
183 k 0.e0,0.e0, 7.e0, 4.e0, 0.e0,0.e0, -.5e0, -.25e0, 0.e0/
186 dtrue(1,1) = 12.e0 / 130.e0
187 dtrue(2,1) = 36.e0 / 130.e0
188 dtrue(7,1) = -1.e0 / 6.e0
189 dtrue(1,2) = 14.e0 / 75.e0
190 dtrue(2,2) = 49.e0 / 75.e0
191 dtrue(9,2) = 1.e0 / 7.e0
192 dtrue(1,5) = 45.e-11 * (d12 * d12)
193 dtrue(3,5) = 4.e5 / (3.e0 * d12)
194 dtrue(6,5) = 1.e0 / d12
195 dtrue(8,5) = 1.e4 / (3.e0 * d12)
196 dtrue(1,6) = 4.e10 / (1.5e0 * d12 * d12)
197 dtrue(2,6) = 2.e-2 / 1.5e0
198 dtrue(8,6) = 5.e-7 * d12
199 dtrue(1,7) = 4.e0 / 150.e0
200 dtrue(2,7) = (2.e-10 / 1.5e0) * (d12 * d12)
201 dtrue(7,7) = -dtrue(6,5)
202 dtrue(9,7) = 1.e4 / d12
203 dtrue(1,8) = dtrue(1,7)
204 dtrue(2,8) = 2.e10 / (1.5e0 * d12 * d12)
205 dtrue(1,9) = 32.e0 / 7.e0
206 dtrue(2,9) = -16.e0 / 7.e0
212 dbtrue(1) = 1.0e0/0.6e0
213 dbtrue(3) = -1.0e0/0.6e0
214 dbtrue(5) = 1.0e0/0.6e0
224 CALL srotg(sa,sb,sc,ss)
225 CALL stest1(sa,datrue(k),datrue(k),sfac)
226 CALL stest1(sb,dbtrue(k),dbtrue(k),sfac)
227 CALL stest1(sc,dc1(k),dc1(k),sfac)
228 CALL stest1(ss,ds1(k),ds1(k),sfac)
229 ELSEIF (icase.EQ.11)
THEN
236 CALL srotmg(dtemp(1),dtemp(2),dtemp(3),dtemp(4),dtemp(5))
237 CALL stest(9,dtemp,dtrue(1,k),dtrue(1,k),sfac)
239 WRITE (nout,*)
' Shouldn''t be here in CHECK0'
252 parameter(nout=6, thresh=10.0e0)
256 INTEGER ICASE, INCX, INCY, N
259 INTEGER I, IX, LEN, NP1
261 REAL DTRUE1(5), DTRUE3(5), DTRUE5(8,5,2), DV(8,5,2),
262 + DVR(8), SA(10), STEMP(1), STRUE(8), SX(8),
264 INTEGER ITRUE2(5), ITRUEC(5)
268 EXTERNAL sasum, snrm2, isamax
274 COMMON /combla/icase, n, incx, incy, pass
276 DATA sa/0.3e0, -1.0e0, 0.0e0, 1.0e0, 0.3e0, 0.3e0,
277 + 0.3e0, 0.3e0, 0.3e0, 0.3e0/
278 DATA dv/0.1e0, 2.0e0, 2.0e0, 2.0e0, 2.0e0, 2.0e0,
279 + 2.0e0, 2.0e0, 0.3e0, 3.0e0, 3.0e0, 3.0e0, 3.0e0,
280 + 3.0e0, 3.0e0, 3.0e0, 0.3e0, -0.4e0, 4.0e0,
281 + 4.0e0, 4.0e0, 4.0e0, 4.0e0, 4.0e0, 0.2e0,
282 + -0.6e0, 0.3e0, 5.0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e0, 2.0e0, 2.0e0, 0.06e0, 3.0e0,
306 + -0.18e0, 5.0e0, 0.09e0, 2.0e0, 2.0e0, 2.0e0,
307 + 0.03e0, 4.0e0, -0.09e0, 6.0e0, -0.15e0, 7.0e0,
309 DATA itrue2/0, 1, 2, 2, 3/
310 DATA itruec/0, 1, 1, 1, 1/
318 sx(i) = dv(i,np1,incx)
324 CALL sb1nrm2(n,(incx-2)*2,thresh)
327 stemp(1) = dtrue1(np1)
328 CALL stest1(snrm2(n,sx,incx),stemp(1),stemp,sfac)
329 ELSE IF (icase.EQ.8)
THEN
331 stemp(1) = dtrue3(np1)
332 CALL stest1(sasum(n,sx,incx),stemp(1),stemp,sfac)
333 ELSE IF (icase.EQ.9)
THEN
335 CALL sscal(n,sa((incx-1)*5+np1),sx,incx)
337 strue(i) = dtrue5(i,np1,incx)
339 CALL stest(len,sx,strue,strue,sfac)
340 ELSE IF (icase.EQ.10)
THEN
342 CALL itest1(isamax(n,sx,incx),itrue2(np1))
346 CALL itest1(isamax(n,sx,incx),itruec(np1))
348 WRITE (nout,*)
' Shouldn''t be here in CHECK1'
352 IF (icase.EQ.10)
THEN
359 CALL itest1(isamax(n,sxr,incx),3)
374 INTEGER ICASE, INCX, INCY, N
378 INTEGER I, J, KI, KN, KNI, KPAR, KSIZE, LENX, LENY,
379 $ LINCX, LINCY, MX, MY
381 REAL DT10X(7,4,4), DT10Y(7,4,4), DT7(4,4),
382 $ DT8(7,4,4), DX1(7),
383 $ DY1(7), SSIZE1(4), SSIZE2(14,2), SSIZE3(4),
384 $ SSIZE(7), STX(7), STY(7), SX(7), SY(7),
385 $ DPAR(5,4), DT19X(7,4,16),DT19XA(7,4,4),
386 $ DT19XB(7,4,4), DT19XC(7,4,4),DT19XD(7,4,4),
387 $ DT19Y(7,4,16), DT19YA(7,4,4),DT19YB(7,4,4),
388 $ DT19YC(7,4,4), DT19YD(7,4,4), DTEMP(5),
389 $ ST7B(4,4), STY0(1), SX0(1), SY0(1)
390 INTEGER INCXS(4), INCYS(4), LENS(4,2), NS(4)
393 EXTERNAL sdot, sdsdot
399 COMMON /combla/icase, n, incx, incy, pass
401 equivalence(dt19x(1,1,1),dt19xa(1,1,1)),(dt19x(1,1,5),
402 a dt19xb(1,1,1)),(dt19x(1,1,9),dt19xc(1,1,1)),
403 b (dt19x(1,1,13),dt19xd(1,1,1))
404 equivalence(dt19y(1,1,1),dt19ya(1,1,1)),(dt19y(1,1,5),
405 a dt19yb(1,1,1)),(dt19y(1,1,9),dt19yc(1,1,1)),
406 b (dt19y(1,1,13),dt19yd(1,1,1))
409 DATA incxs/1, 2, -2, -1/
410 DATA incys/1, -2, 1, -2/
411 DATA lens/1, 1, 2, 4, 1, 1, 3, 7/
413 DATA dx1/0.6e0, 0.1e0, -0.5e0, 0.8e0, 0.9e0, -0.3e0,
415 DATA dy1/0.5e0, -0.9e0, 0.3e0, 0.7e0, -0.6e0, 0.2e0,
417 DATA dt7/0.0e0, 0.30e0, 0.21e0, 0.62e0, 0.0e0,
418 + 0.30e0, -0.07e0, 0.85e0, 0.0e0, 0.30e0, -0.79e0,
419 + -0.74e0, 0.0e0, 0.30e0, 0.33e0, 1.27e0/
420 DATA st7b/ .1, .4, .31, .72, .1, .4, .03, .95,
421 + .1, .4, -.69, -.64, .1, .4, .43, 1.37/
422 DATA dt8/0.5e0, 0.0e0, 0.0e0, 0.0e0, 0.0e0, 0.0e0,
423 + 0.0e0, 0.68e0, 0.0e0, 0.0e0, 0.0e0, 0.0e0,
424 + 0.0e0, 0.0e0, 0.68e0, -0.87e0, 0.0e0, 0.0e0,
425 + 0.0e0, 0.0e0, 0.0e0, 0.68e0, -0.87e0, 0.15e0,
426 + 0.94e0, 0.0e0, 0.0e0, 0.0e0, 0.5e0, 0.0e0,
427 + 0.0e0, 0.0e0, 0.0e0, 0.0e0, 0.0e0, 0.68e0,
428 + 0.0e0, 0.0e0, 0.0e0, 0.0e0, 0.0e0, 0.0e0,
429 + 0.35e0, -0.9e0, 0.48e0, 0.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.0e0,
473 + 0.0e0, 0.6e0, 0.0e0, 0.0e0, 0.0e0, 0.0e0, 0.0e0,
474 + 0.0e0, 0.6e0, -0.9e0, 0.1e0, 0.0e0, 0.0e0,
475 + 0.0e0, 0.0e0, 0.6e0, -0.9e0, 0.1e0, 0.7e0,
476 + -0.5e0, 0.2e0, 0.8e0/
477 DATA ssize1/0.0e0, 0.3e0, 1.6e0, 3.2e0/
478 DATA ssize2/0.0e0, 0.0e0, 0.0e0, 0.0e0, 0.0e0, 0.0e0,
479 + 0.0e0, 0.0e0, 0.0e0, 0.0e0, 0.0e0, 0.0e0, 0.0e0,
480 + 0.0e0, 1.17e0, 1.17e0, 1.17e0, 1.17e0, 1.17e0,
481 + 1.17e0, 1.17e0, 1.17e0, 1.17e0, 1.17e0, 1.17e0,
482 + 1.17e0, 1.17e0, 1.17e0/
483 DATA ssize3/ .1, .4, 1.7, 3.3 /
487 DATA dpar/-2.e0, 0.e0,0.e0,0.e0,0.e0,
488 a -1.e0, 2.e0, -3.e0, -4.e0, 5.e0,
489 b 0.e0, 0.e0, 2.e0, -3.e0, 0.e0,
490 c 1.e0, 5.e0, 2.e0, 0.e0, -4.e0/
492 DATA dt19xa/.6e0, 0.e0,0.e0,0.e0,0.e0,0.e0,0.e0,
493 a .6e0, 0.e0,0.e0,0.e0,0.e0,0.e0,0.e0,
494 b .6e0, 0.e0,0.e0,0.e0,0.e0,0.e0,0.e0,
495 c .6e0, 0.e0,0.e0,0.e0,0.e0,0.e0,0.e0,
496 d .6e0, 0.e0,0.e0,0.e0,0.e0,0.e0,0.e0,
497 e -.8e0, 0.e0,0.e0,0.e0,0.e0,0.e0,0.e0,
498 f -.9e0, 0.e0,0.e0,0.e0,0.e0,0.e0,0.e0,
499 g 3.5e0, 0.e0,0.e0,0.e0,0.e0,0.e0,0.e0,
500 h .6e0, .1e0, 0.e0,0.e0,0.e0,0.e0,0.e0,
501 i -.8e0, 3.8e0, 0.e0,0.e0,0.e0,0.e0,0.e0,
502 j -.9e0, 2.8e0, 0.e0,0.e0,0.e0,0.e0,0.e0,
503 k 3.5e0, -.4e0, 0.e0,0.e0,0.e0,0.e0,0.e0,
504 l .6e0, .1e0, -.5e0, .8e0, 0.e0,0.e0,0.e0,
505 m -.8e0, 3.8e0, -2.2e0, -1.2e0, 0.e0,0.e0,0.e0,
506 n -.9e0, 2.8e0, -1.4e0, -1.3e0, 0.e0,0.e0,0.e0,
507 o 3.5e0, -.4e0, -2.2e0, 4.7e0, 0.e0,0.e0,0.e0/
509 DATA dt19xb/.6e0, 0.e0,0.e0,0.e0,0.e0,0.e0,0.e0,
510 a .6e0, 0.e0,0.e0,0.e0,0.e0,0.e0,0.e0,
511 b .6e0, 0.e0,0.e0,0.e0,0.e0,0.e0,0.e0,
512 c .6e0, 0.e0,0.e0,0.e0,0.e0,0.e0,0.e0,
513 d .6e0, 0.e0,0.e0,0.e0,0.e0,0.e0,0.e0,
514 e -.8e0, 0.e0,0.e0,0.e0,0.e0,0.e0,0.e0,
515 f -.9e0, 0.e0,0.e0,0.e0,0.e0,0.e0,0.e0,
516 g 3.5e0, 0.e0,0.e0,0.e0,0.e0,0.e0,0.e0,
517 h .6e0, .1e0, -.5e0, 0.e0,0.e0,0.e0,0.e0,
518 i 0.e0, .1e0, -3.0e0, 0.e0,0.e0,0.e0,0.e0,
519 j -.3e0, .1e0, -2.0e0, 0.e0,0.e0,0.e0,0.e0,
520 k 3.3e0, .1e0, -2.0e0, 0.e0,0.e0,0.e0,0.e0,
521 l .6e0, .1e0, -.5e0, .8e0, .9e0, -.3e0, -.4e0,
522 m -2.0e0, .1e0, 1.4e0, .8e0, .6e0, -.3e0, -2.8e0,
523 n -1.8e0, .1e0, 1.3e0, .8e0, 0.e0, -.3e0, -1.9e0,
524 o 3.8e0, .1e0, -3.1e0, .8e0, 4.8e0, -.3e0, -1.5e0 /
526 DATA dt19xc/.6e0, 0.e0,0.e0,0.e0,0.e0,0.e0,0.e0,
527 a .6e0, 0.e0,0.e0,0.e0,0.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.e0,0.e0,0.e0,
604 j -.5e0, .3e0, 0.e0,0.e0,0.e0,0.e0,0.e0,
605 k -1.5e0, 3.0e0, 0.e0,0.e0,0.e0,0.e0,0.e0,
606 l .5e0, -.9e0, .3e0, .7e0, 0.e0,0.e0,0.e0,
607 m 3.7e0, -7.2e0, 3.0e0, 1.7e0, 0.e0,0.e0,0.e0,
608 n -.3e0, .9e0, -.7e0, 1.9e0, 0.e0,0.e0,0.e0,
609 o -1.6e0, 2.7e0, -.7e0, -3.4e0, 0.e0,0.e0,0.e0/
611 DATA dt19yd/.5e0, 0.e0,0.e0,0.e0,0.e0,0.e0,0.e0,
612 a .5e0, 0.e0,0.e0,0.e0,0.e0,0.e0,0.e0,
613 b .5e0, 0.e0,0.e0,0.e0,0.e0,0.e0,0.e0,
614 c .5e0, 0.e0,0.e0,0.e0,0.e0,0.e0,0.e0,
615 d .5e0, 0.e0,0.e0,0.e0,0.e0,0.e0,0.e0,
616 e .7e0, 0.e0,0.e0,0.e0,0.e0,0.e0,0.e0,
617 f 1.7e0, 0.e0,0.e0,0.e0,0.e0,0.e0,0.e0,
618 g -2.6e0, 0.e0,0.e0,0.e0,0.e0,0.e0,0.e0,
619 h .5e0, -.9e0, .3e0, 0.e0,0.e0,0.e0,0.e0,
620 i .7e0, -.9e0, 1.2e0, 0.e0,0.e0,0.e0,0.e0,
621 j 1.7e0, -.9e0, .5e0, 0.e0,0.e0,0.e0,0.e0,
622 k -2.6e0, -.9e0, -1.3e0, 0.e0,0.e0,0.e0,0.e0,
623 l .5e0, -.9e0, .3e0, .7e0, -.6e0, .2e0, .8e0,
624 m .7e0, -.9e0, 1.2e0, .7e0, -1.5e0, .2e0, 1.6e0,
625 n 1.7e0, -.9e0, .5e0, .7e0, -1.6e0, .2e0, 2.4e0,
626 o -2.6e0, -.9e0, -1.3e0, .7e0, 2.9e0, .2e0, -4.0e0 /
649 CALL stest1(sdot(n,sx,incx,sy,incy),dt7(kn,ki),ssize1(kn)
651 ELSE IF (icase.EQ.2)
THEN
653 CALL saxpy(n,sa,sx,incx,sy,incy)
655 sty(j) = dt8(j,kn,ki)
657 CALL stest(leny,sy,sty,ssize2(1,ksize),sfac)
658 ELSE IF (icase.EQ.5)
THEN
661 sty(i) = dt10y(i,kn,ki)
663 CALL scopy(n,sx,incx,sy,incy)
664 CALL stest(leny,sy,sty,ssize2(1,1),1.0e0)
677 CALL scopy(n,sx0,incx,sy0,incy)
678 CALL stest(1,sy0,sty0,ssize2(1,1),1.0e0)
682 ELSE IF (icase.EQ.6)
THEN
684 CALL sswap(n,sx,incx,sy,incy)
686 stx(i) = dt10x(i,kn,ki)
687 sty(i) = dt10y(i,kn,ki)
689 CALL stest(lenx,sx,stx,ssize2(1,1),1.0e0)
690 CALL stest(leny,sy,sty,ssize2(1,1),1.0e0)
691 ELSEIF (icase.EQ.12)
THEN
698 stx(i)= dt19x(i,kpar,kni)
699 sty(i)= dt19y(i,kpar,kni)
703 dtemp(i) = dpar(i,kpar)
711 IF ((kpar .EQ. 2) .AND. (kni .EQ. 7))
713 IF ((kpar .EQ. 3) .AND. (kni .EQ. 8))
716 CALL srotm(n,sx,incx,sy,incy,dtemp)
717 CALL stest(lenx,sx,stx,ssize,sfac)
718 CALL stest(leny,sy,sty,sty,sfac)
720 ELSEIF (icase.EQ.13)
THEN
722 CALL stest1 (sdsdot(n,.1,sx,incx,sy,incy),
723 $ st7b(kn,ki),ssize3(kn),sfac)
725 WRITE (nout,*)
' Shouldn''t be here in CHECK2'
742 INTEGER ICASE, INCX, INCY, N
746 INTEGER I, K, KI, KN, KSIZE, LENX, LENY, MX, MY
748 REAL COPYX(5), COPYY(5), DT9X(7,4,4), DT9Y(7,4,4),
749 + DX1(7), DY1(7), MWPC(11), MWPS(11), MWPSTX(5),
750 + MWPSTY(5), MWPTX(11,5), MWPTY(11,5), MWPX(5),
751 + MWPY(5), SSIZE2(14,2), STX(7), STY(7), SX(7),
753 INTEGER INCXS(4), INCYS(4), LENS(4,2), MWPINX(11),
754 + MWPINY(11), MWPN(11), NS(4)
760 COMMON /combla/icase, n, incx, incy, pass
762 DATA incxs/1, 2, -2, -1/
763 DATA incys/1, -2, 1, -2/
764 DATA lens/1, 1, 2, 4, 1, 1, 3, 7/
766 DATA dx1/0.6e0, 0.1e0, -0.5e0, 0.8e0, 0.9e0, -0.3e0,
768 DATA dy1/0.5e0, -0.9e0, 0.3e0, 0.7e0, -0.6e0, 0.2e0,
770 DATA sc, ss/0.8e0, 0.6e0/
771 DATA dt9x/0.6e0, 0.0e0, 0.0e0, 0.0e0, 0.0e0, 0.0e0,
772 + 0.0e0, 0.78e0, 0.0e0, 0.0e0, 0.0e0, 0.0e0,
773 + 0.0e0, 0.0e0, 0.78e0, -0.46e0, 0.0e0, 0.0e0,
774 + 0.0e0, 0.0e0, 0.0e0, 0.78e0, -0.46e0, -0.22e0,
775 + 1.06e0, 0.0e0, 0.0e0, 0.0e0, 0.6e0, 0.0e0,
776 + 0.0e0, 0.0e0, 0.0e0, 0.0e0, 0.0e0, 0.78e0,
777 + 0.0e0, 0.0e0, 0.0e0, 0.0e0, 0.0e0, 0.0e0,
778 + 0.66e0, 0.1e0, -0.1e0, 0.0e0, 0.0e0, 0.0e0,
779 + 0.0e0, 0.96e0, 0.1e0, -0.76e0, 0.8e0, 0.90e0,
780 + -0.3e0, -0.02e0, 0.6e0, 0.0e0, 0.0e0, 0.0e0,
781 + 0.0e0, 0.0e0, 0.0e0, 0.78e0, 0.0e0, 0.0e0,
782 + 0.0e0, 0.0e0, 0.0e0, 0.0e0, -0.06e0, 0.1e0,
783 + -0.1e0, 0.0e0, 0.0e0, 0.0e0, 0.0e0, 0.90e0,
784 + 0.1e0, -0.22e0, 0.8e0, 0.18e0, -0.3e0, -0.02e0,
785 + 0.6e0, 0.0e0, 0.0e0, 0.0e0, 0.0e0, 0.0e0, 0.0e0,
786 + 0.78e0, 0.0e0, 0.0e0, 0.0e0, 0.0e0, 0.0e0,
787 + 0.0e0, 0.78e0, 0.26e0, 0.0e0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.0e0, 0.0e0, 0.0e0, 0.0e0, 0.0e0,
811 + 0.0e0, 1.17e0, 1.17e0, 1.17e0, 1.17e0, 1.17e0,
812 + 1.17e0, 1.17e0, 1.17e0, 1.17e0, 1.17e0, 1.17e0,
813 + 1.17e0, 1.17e0, 1.17e0/
833 stx(i) = dt9x(i,kn,ki)
834 sty(i) = dt9y(i,kn,ki)
836 CALL srot(n,sx,incx,sy,incy,sc,ss)
837 CALL stest(lenx,sx,stx,ssize2(1,ksize),sfac)
838 CALL stest(leny,sy,sty,ssize2(1,ksize),sfac)
840 WRITE (nout,*)
' Shouldn''t be here in CHECK3'
932 mwpstx(k) = mwptx(i,k)
933 mwpsty(k) = mwpty(i,k)
935 CALL srot(mwpn(i),copyx,incx,copyy,incy,mwpc(i),mwps(i))
936 CALL stest(5,copyx,mwpstx,mwpstx,sfac)
937 CALL stest(5,copyy,mwpsty,mwpsty,sfac)
944 SUBROUTINE stest(LEN,SCOMP,STRUE,SSIZE,SFAC)
956 parameter(nout=6, zero=0.0e0)
961 REAL SCOMP(LEN), SSIZE(LEN), STRUE(LEN)
963 INTEGER ICASE, INCX, INCY, N
974 COMMON /combla/icase, n, incx, incy, pass
978 sd = scomp(i) - strue(i)
979 IF (abs(sfac*sd) .LE. abs(ssize(i))*epsilon(zero))
984 IF ( .NOT. pass)
GO TO 20
989 20
WRITE (nout,99997) icase, n, incx, incy, i, scomp(i),
990 + strue(i), sd, ssize(i)
99499999
FORMAT (
' FAIL')
99599998
FORMAT (/
' CASE N INCX INCY I ',
996 +
' COMP(I) TRUE(I) DIFFERENCE',
99899997
FORMAT (1x,i4,i3,2i5,i3,2e36.8,2e12.4)
1013 REAL SCOMP1, SFAC, STRUE1
1017 REAL SCOMP(1), STRUE(1)
1024 CALL stest(1,scomp,strue,ssize,sfac)
1055 INTEGER ICOMP, ITRUE
1057 INTEGER ICASE, INCX, INCY, N
1062 COMMON /combla/icase, n, incx, incy, pass
1065 IF (icomp.EQ.itrue)
GO TO 40
1069 IF ( .NOT. pass)
GO TO 20
1074 20 id = icomp - itrue
1075 WRITE (nout,99997) icase, n, incx, incy, icomp, itrue, id
107999999
FORMAT (
' FAIL')
108099998
FORMAT (/
' CASE N INCX INCY ',
1081 +
' COMP TRUE DIFFERENCE',
108399997
FORMAT (1x,i4,i3,2i5,2i36,i12)
1111 INTEGER NMAX, NOUT, NV
1112 parameter(nmax=20, nout=6, nv=10)
1113 REAL HALF, ONE, TWO, ZERO
1114 parameter(half=0.5e+0, one=1.0e+0, two= 2.0e+0,
1120 INTRINSIC abs, max, min, real, sqrt
1122 REAL BIGNUM, SAFMAX, SAFMIN, SMLNUM, ULP
1123 parameter(bignum=0.1014120480e+32,
1124 & safmax=0.8507059173e+38,
1125 & safmin=0.1175494351e-37,
1126 & smlnum=0.9860761315e-31,
1127 & ulp=0.1192092896e-06)
1129 REAL ROGUE, SNRM, TRAT, V0, V1, WORKSSQ, Y1, Y2,
1130 & YMAX, YMIN, YNRM, ZNRM
1131 INTEGER I, IV, IW, IX
1134 REAL VALUES(NV), WORK(NMAX), X(NMAX), Z(NMAX)
1137 values(2) = two*safmin
1141 values(6) = one / ulp
1144 values(9) = sxvals(v0,2)
1145 values(10) = sxvals(v0,3)
1146 rogue = -1234.5678e+0
1151 IF (n*abs(incx).GT.nmax)
THEN
1152 WRITE (nout,99)
"SNRM2", nmax, incx, n, n*abs(incx)
1164 CALL random_number(work(i))
1165 work(i) = one - two*work(i)
1173 workssq = workssq + work(i)*work(i)
1182 IF (abs(v0).GT.one)
THEN
1188 IF (abs(v1).GT.one)
THEN
1189 v1 = (v1*half) / sqrt(real(n))
1199 y2 = abs(v1)*sqrt(workssq)
1210 IF ((y1.NE.y1).OR.(y2.NE.y2))
THEN
1213 ELSE IF (ymin == ymax)
THEN
1214 ynrm = sqrt(two)*ymax
1215 ELSE IF (ymax == zero)
THEN
1218 ynrm = ymax*sqrt(one + (ymin / ymax)**2)
1227 IF (incx.LT.0) ix = 1 - (n-1)*incx
1235 snrm = snrm2(n,x,incx)
1241 znrm = sqrt(real(n))*abs(x(1))
1248 IF ((snrm.NE.snrm).OR.(znrm.NE.znrm))
THEN
1249 IF ((snrm.NE.snrm).NEQV.(znrm.NE.znrm))
THEN
1254 ELSE IF (snrm == znrm)
THEN
1256 ELSE IF (znrm == zero)
THEN
1259 trat = (abs(snrm-znrm) / znrm) / (real(n)*ulp)
1261 IF ((trat.NE.trat).OR.(trat.GE.thresh))
THEN
1266 WRITE (nout,98)
"SNRM2", n, incx, iv, iw, trat
127099999
FORMAT (
' FAIL')
1271 99
FORMAT (
' Not enough space to test ', a6,
': NMAX = ',i6,
1272 +
', INCX = ',i6,/,
' N = ',i6,
', must be at least ',i6 )
1273 98
FORMAT( 1x, a6,
': N=', i6,
', INCX=', i4,
', IV=', i2,
', IW=',
1274 + i2,
', test=', e15.8 )
1277 REAL FUNCTION SXVALS(XX,K)
1290 ELSE IF (k.EQ.2)
THEN
1292 ELSE IF (k.EQ.3)
THEN
subroutine stest(len, scomp, strue, ssize, sfac)
subroutine stest1(scomp1, strue1, ssize, sfac)
subroutine itest1(icomp, itrue)
real function sdiff(sa, sb)
subroutine saxpy(n, sa, sx, incx, sy, incy)
SAXPY
subroutine scopy(n, sx, incx, sy, incy)
SCOPY
subroutine srot(n, sx, incx, sy, incy, c, s)
SROT
subroutine srotg(a, b, c, s)
SROTG
subroutine srotm(n, sx, incx, sy, incy, sparam)
SROTM
subroutine srotmg(sd1, sd2, sx1, sy1, sparam)
SROTMG
subroutine sscal(n, sa, sx, incx)
SSCAL
subroutine sswap(n, sx, incx, sy, incy)
SSWAP
subroutine sb1nrm2(n, incx, thresh)