249
250 INTEGER NOUT
251 REAL THRESH
252 parameter(nout=6, thresh=10.0e0)
253
254 REAL SFAC
255
256 INTEGER ICASE, INCX, INCY, N
257 LOGICAL PASS
258
259 INTEGER I, IX, LEN, NP1
260
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),
263 + SXR(15)
264 INTEGER ITRUE2(5), ITRUEC(5)
265
266 REAL SASUM, SNRM2
267 INTEGER ISAMAX
269
271
272 INTRINSIC max
273
274 COMMON /combla/icase, n, incx, incy, pass
275
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.0e0, 5.0e0, 5.0e0, 5.0e0,
283 + 5.0e0, 0.1e0, -0.3e0, 0.5e0, -0.1e0, 6.0e0,
284 + 6.0e0, 6.0e0, 6.0e0, 0.1e0, 8.0e0, 8.0e0, 8.0e0,
285 + 8.0e0, 8.0e0, 8.0e0, 8.0e0, 0.3e0, 9.0e0, 9.0e0,
286 + 9.0e0, 9.0e0, 9.0e0, 9.0e0, 9.0e0, 0.3e0, 2.0e0,
287 + -0.4e0, 2.0e0, 2.0e0, 2.0e0, 2.0e0, 2.0e0,
288 + 0.2e0, 3.0e0, -0.6e0, 5.0e0, 0.3e0, 2.0e0,
289 + 2.0e0, 2.0e0, 0.1e0, 4.0e0, -0.3e0, 6.0e0,
290 + -0.5e0, 7.0e0, -0.1e0, 3.0e0/
291 DATA dvr/8.0e0, -7.0e0, 9.0e0, 5.0e0, 9.0e0, 8.0e0,
292 + 7.0e0, 7.0e0/
293 DATA dtrue1/0.0e0, 0.3e0, 0.5e0, 0.7e0, 0.6e0/
294 DATA dtrue3/0.0e0, 0.3e0, 0.7e0, 1.1e0, 1.0e0/
295 DATA dtrue5/0.10e0, 2.0e0, 2.0e0, 2.0e0, 2.0e0,
296 + 2.0e0, 2.0e0, 2.0e0, -0.3e0, 3.0e0, 3.0e0,
297 + 3.0e0, 3.0e0, 3.0e0, 3.0e0, 3.0e0, 0.0e0, 0.0e0,
298 + 4.0e0, 4.0e0, 4.0e0, 4.0e0, 4.0e0, 4.0e0,
299 + 0.20e0, -0.60e0, 0.30e0, 5.0e0, 5.0e0, 5.0e0,
300 + 5.0e0, 5.0e0, 0.03e0, -0.09e0, 0.15e0, -0.03e0,
301 + 6.0e0, 6.0e0, 6.0e0, 6.0e0, 0.10e0, 8.0e0,
302 + 8.0e0, 8.0e0, 8.0e0, 8.0e0, 8.0e0, 8.0e0,
303 + 0.09e0, 9.0e0, 9.0e0, 9.0e0, 9.0e0, 9.0e0,
304 + 9.0e0, 9.0e0, 0.09e0, 2.0e0, -0.12e0, 2.0e0,
305 + 2.0e0, 2.0e0, 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,
308 + -0.03e0, 3.0e0/
309 DATA itrue2/0, 1, 2, 2, 3/
310 DATA itruec/0, 1, 1, 1, 1/
311
312 DO 80 incx = 1, 2
313 DO 60 np1 = 1, 5
314 n = np1 - 1
315 len = 2*max(n,1)
316
317 DO 20 i = 1, len
318 sx(i) = dv(i,np1,incx)
319 20 CONTINUE
320
321 IF (icase.EQ.7) THEN
322
323
324 CALL sb1nrm2(n,(incx-2)*2,thresh)
326
327 stemp(1) = dtrue1(np1)
329 ELSE IF (icase.EQ.8) THEN
330
331 stemp(1) = dtrue3(np1)
333 ELSE IF (icase.EQ.9) THEN
334
335 CALL sscal(n,sa((incx-1)*5+np1),sx,incx)
336 DO 40 i = 1, len
337 strue(i) = dtrue5(i,np1,incx)
338 40 CONTINUE
339 CALL stest(len,sx,strue,strue,sfac)
340 ELSE IF (icase.EQ.10) THEN
341
343 DO 100 i = 1, len
344 sx(i) = 42.0e0
345 100 CONTINUE
347 ELSE
348 WRITE (nout,*) ' Shouldn''t be here in CHECK1'
349 stop
350 END IF
351 60 CONTINUE
352 IF (icase.EQ.10) THEN
353 n = 8
354 ix = 1
355 DO 120 i = 1, n
356 sxr(ix) = dvr(i)
357 ix = ix + incx
358 120 CONTINUE
360 END IF
361 80 CONTINUE
362 RETURN
363
364
365
subroutine stest(len, scomp, strue, ssize, sfac)
subroutine stest1(scomp1, strue1, ssize, sfac)
subroutine itest1(icomp, itrue)
real function sasum(n, sx, incx)
SASUM
integer function isamax(n, sx, incx)
ISAMAX
real(wp) function snrm2(n, x, incx)
SNRM2
subroutine sscal(n, sa, sx, incx)
SSCAL
subroutine sb1nrm2(n, incx, thresh)