249
250 DOUBLE PRECISION THRESH
251 INTEGER NOUT
252 parameter(nout=6, thresh=10.0d0)
253
254 DOUBLE PRECISION SFAC
255
256 INTEGER ICASE, INCX, INCY, N
257 LOGICAL PASS
258
259 INTEGER I, IX, LEN, NP1
260
261 DOUBLE PRECISION 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 DOUBLE PRECISION DASUM, DNRM2
267 INTEGER IDAMAX
269
271
272 INTRINSIC max
273
274 COMMON /combla/icase, n, incx, incy, pass
275
276 DATA sa/0.3d0, -1.0d0, 0.0d0, 1.0d0, 0.3d0, 0.3d0,
277 + 0.3d0, 0.3d0, 0.3d0, 0.3d0/
278 DATA dv/0.1d0, 2.0d0, 2.0d0, 2.0d0, 2.0d0, 2.0d0,
279 + 2.0d0, 2.0d0, 0.3d0, 3.0d0, 3.0d0, 3.0d0, 3.0d0,
280 + 3.0d0, 3.0d0, 3.0d0, 0.3d0, -0.4d0, 4.0d0,
281 + 4.0d0, 4.0d0, 4.0d0, 4.0d0, 4.0d0, 0.2d0,
282 + -0.6d0, 0.3d0, 5.0d0, 5.0d0, 5.0d0, 5.0d0,
283 + 5.0d0, 0.1d0, -0.3d0, 0.5d0, -0.1d0, 6.0d0,
284 + 6.0d0, 6.0d0, 6.0d0, 0.1d0, 8.0d0, 8.0d0, 8.0d0,
285 + 8.0d0, 8.0d0, 8.0d0, 8.0d0, 0.3d0, 9.0d0, 9.0d0,
286 + 9.0d0, 9.0d0, 9.0d0, 9.0d0, 9.0d0, 0.3d0, 2.0d0,
287 + -0.4d0, 2.0d0, 2.0d0, 2.0d0, 2.0d0, 2.0d0,
288 + 0.2d0, 3.0d0, -0.6d0, 5.0d0, 0.3d0, 2.0d0,
289 + 2.0d0, 2.0d0, 0.1d0, 4.0d0, -0.3d0, 6.0d0,
290 + -0.5d0, 7.0d0, -0.1d0, 3.0d0/
291 DATA dvr/8.0d0, -7.0d0, 9.0d0, 5.0d0, 9.0d0, 8.0d0,
292 + 7.0d0, 7.0d0/
293 DATA dtrue1/0.0d0, 0.3d0, 0.5d0, 0.7d0, 0.6d0/
294 DATA dtrue3/0.0d0, 0.3d0, 0.7d0, 1.1d0, 1.0d0/
295 DATA dtrue5/0.10d0, 2.0d0, 2.0d0, 2.0d0, 2.0d0,
296 + 2.0d0, 2.0d0, 2.0d0, -0.3d0, 3.0d0, 3.0d0,
297 + 3.0d0, 3.0d0, 3.0d0, 3.0d0, 3.0d0, 0.0d0, 0.0d0,
298 + 4.0d0, 4.0d0, 4.0d0, 4.0d0, 4.0d0, 4.0d0,
299 + 0.20d0, -0.60d0, 0.30d0, 5.0d0, 5.0d0, 5.0d0,
300 + 5.0d0, 5.0d0, 0.03d0, -0.09d0, 0.15d0, -0.03d0,
301 + 6.0d0, 6.0d0, 6.0d0, 6.0d0, 0.10d0, 8.0d0,
302 + 8.0d0, 8.0d0, 8.0d0, 8.0d0, 8.0d0, 8.0d0,
303 + 0.09d0, 9.0d0, 9.0d0, 9.0d0, 9.0d0, 9.0d0,
304 + 9.0d0, 9.0d0, 0.09d0, 2.0d0, -0.12d0, 2.0d0,
305 + 2.0d0, 2.0d0, 2.0d0, 2.0d0, 0.06d0, 3.0d0,
306 + -0.18d0, 5.0d0, 0.09d0, 2.0d0, 2.0d0, 2.0d0,
307 + 0.03d0, 4.0d0, -0.09d0, 6.0d0, -0.15d0, 7.0d0,
308 + -0.03d0, 3.0d0/
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 db1nrm2(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 dscal(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.0d0
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)
subroutine db1nrm2(n, incx, thresh)
double precision function dasum(n, dx, incx)
DASUM
integer function idamax(n, dx, incx)
IDAMAX
real(wp) function dnrm2(n, x, incx)
DNRM2
subroutine dscal(n, da, dx, incx)
DSCAL