source: pacpussensors/trunk/Vislab/lib3dv/eigen/blas/testing/dblat1.f@ 140

Last change on this file since 140 was 136, checked in by ldecherf, 8 years ago

Doc

File size: 43.8 KB
Line 
1*> \brief \b DBLAT1
2*
3* =========== DOCUMENTATION ===========
4*
5* Online html documentation available at
6* http://www.netlib.org/lapack/explore-html/
7*
8* Definition:
9* ===========
10*
11* PROGRAM DBLAT1
12*
13*
14*> \par Purpose:
15* =============
16*>
17*> \verbatim
18*>
19*> Test program for the DOUBLE PRECISION Level 1 BLAS.
20*>
21*> Based upon the original BLAS test routine together with:
22*> F06EAF Example Program Text
23*> \endverbatim
24*
25* Authors:
26* ========
27*
28*> \author Univ. of Tennessee
29*> \author Univ. of California Berkeley
30*> \author Univ. of Colorado Denver
31*> \author NAG Ltd.
32*
33*> \date April 2012
34*
35*> \ingroup double_blas_testing
36*
37* =====================================================================
38 PROGRAM DBLAT1
39*
40* -- Reference BLAS test routine (version 3.4.1) --
41* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
42* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
43* April 2012
44*
45* =====================================================================
46*
47* .. Parameters ..
48 INTEGER NOUT
49 PARAMETER (NOUT=6)
50* .. Scalars in Common ..
51 INTEGER ICASE, INCX, INCY, N
52 LOGICAL PASS
53* .. Local Scalars ..
54 DOUBLE PRECISION SFAC
55 INTEGER IC
56* .. External Subroutines ..
57 EXTERNAL CHECK0, CHECK1, CHECK2, CHECK3, HEADER
58* .. Common blocks ..
59 COMMON /COMBLA/ICASE, N, INCX, INCY, PASS
60* .. Data statements ..
61 DATA SFAC/9.765625D-4/
62* .. Executable Statements ..
63 WRITE (NOUT,99999)
64 DO 20 IC = 1, 13
65 ICASE = IC
66 CALL HEADER
67*
68* .. Initialize PASS, INCX, and INCY for a new case. ..
69* .. the value 9999 for INCX or INCY will appear in the ..
70* .. detailed output, if any, for cases that do not involve ..
71* .. these parameters ..
72*
73 PASS = .TRUE.
74 INCX = 9999
75 INCY = 9999
76 IF (ICASE.EQ.3 .OR. ICASE.EQ.11) THEN
77 CALL CHECK0(SFAC)
78 ELSE IF (ICASE.EQ.7 .OR. ICASE.EQ.8 .OR. ICASE.EQ.9 .OR.
79 + ICASE.EQ.10) THEN
80 CALL CHECK1(SFAC)
81 ELSE IF (ICASE.EQ.1 .OR. ICASE.EQ.2 .OR. ICASE.EQ.5 .OR.
82 + ICASE.EQ.6 .OR. ICASE.EQ.12 .OR. ICASE.EQ.13) THEN
83 CALL CHECK2(SFAC)
84 ELSE IF (ICASE.EQ.4) THEN
85 CALL CHECK3(SFAC)
86 END IF
87* -- Print
88 IF (PASS) WRITE (NOUT,99998)
89 20 CONTINUE
90 STOP
91*
9299999 FORMAT (' Real BLAS Test Program Results',/1X)
9399998 FORMAT (' ----- PASS -----')
94 END
95 SUBROUTINE HEADER
96* .. Parameters ..
97 INTEGER NOUT
98 PARAMETER (NOUT=6)
99* .. Scalars in Common ..
100 INTEGER ICASE, INCX, INCY, N
101 LOGICAL PASS
102* .. Local Arrays ..
103 CHARACTER*6 L(13)
104* .. Common blocks ..
105 COMMON /COMBLA/ICASE, N, INCX, INCY, PASS
106* .. Data statements ..
107 DATA L(1)/' DDOT '/
108 DATA L(2)/'DAXPY '/
109 DATA L(3)/'DROTG '/
110 DATA L(4)/' DROT '/
111 DATA L(5)/'DCOPY '/
112 DATA L(6)/'DSWAP '/
113 DATA L(7)/'DNRM2 '/
114 DATA L(8)/'DASUM '/
115 DATA L(9)/'DSCAL '/
116 DATA L(10)/'IDAMAX'/
117 DATA L(11)/'DROTMG'/
118 DATA L(12)/'DROTM '/
119 DATA L(13)/'DSDOT '/
120* .. Executable Statements ..
121 WRITE (NOUT,99999) ICASE, L(ICASE)
122 RETURN
123*
12499999 FORMAT (/' Test of subprogram number',I3,12X,A6)
125 END
126 SUBROUTINE CHECK0(SFAC)
127* .. Parameters ..
128 INTEGER NOUT
129 PARAMETER (NOUT=6)
130* .. Scalar Arguments ..
131 DOUBLE PRECISION SFAC
132* .. Scalars in Common ..
133 INTEGER ICASE, INCX, INCY, N
134 LOGICAL PASS
135* .. Local Scalars ..
136 DOUBLE PRECISION SA, SB, SC, SS, D12
137 INTEGER I, K
138* .. Local Arrays ..
139 DOUBLE PRECISION DA1(8), DATRUE(8), DB1(8), DBTRUE(8), DC1(8),
140 $ DS1(8), DAB(4,9), DTEMP(9), DTRUE(9,9)
141* .. External Subroutines ..
142 EXTERNAL DROTG, DROTMG, STEST1
143* .. Common blocks ..
144 COMMON /COMBLA/ICASE, N, INCX, INCY, PASS
145* .. Data statements ..
146 DATA DA1/0.3D0, 0.4D0, -0.3D0, -0.4D0, -0.3D0, 0.0D0,
147 + 0.0D0, 1.0D0/
148 DATA DB1/0.4D0, 0.3D0, 0.4D0, 0.3D0, -0.4D0, 0.0D0,
149 + 1.0D0, 0.0D0/
150 DATA DC1/0.6D0, 0.8D0, -0.6D0, 0.8D0, 0.6D0, 1.0D0,
151 + 0.0D0, 1.0D0/
152 DATA DS1/0.8D0, 0.6D0, 0.8D0, -0.6D0, 0.8D0, 0.0D0,
153 + 1.0D0, 0.0D0/
154 DATA DATRUE/0.5D0, 0.5D0, 0.5D0, -0.5D0, -0.5D0,
155 + 0.0D0, 1.0D0, 1.0D0/
156 DATA DBTRUE/0.0D0, 0.6D0, 0.0D0, -0.6D0, 0.0D0,
157 + 0.0D0, 1.0D0, 0.0D0/
158* INPUT FOR MODIFIED GIVENS
159 DATA DAB/ .1D0,.3D0,1.2D0,.2D0,
160 A .7D0, .2D0, .6D0, 4.2D0,
161 B 0.D0,0.D0,0.D0,0.D0,
162 C 4.D0, -1.D0, 2.D0, 4.D0,
163 D 6.D-10, 2.D-2, 1.D5, 10.D0,
164 E 4.D10, 2.D-2, 1.D-5, 10.D0,
165 F 2.D-10, 4.D-2, 1.D5, 10.D0,
166 G 2.D10, 4.D-2, 1.D-5, 10.D0,
167 H 4.D0, -2.D0, 8.D0, 4.D0 /
168* TRUE RESULTS FOR MODIFIED GIVENS
169 DATA DTRUE/0.D0,0.D0, 1.3D0, .2D0, 0.D0,0.D0,0.D0, .5D0, 0.D0,
170 A 0.D0,0.D0, 4.5D0, 4.2D0, 1.D0, .5D0, 0.D0,0.D0,0.D0,
171 B 0.D0,0.D0,0.D0,0.D0, -2.D0, 0.D0,0.D0,0.D0,0.D0,
172 C 0.D0,0.D0,0.D0, 4.D0, -1.D0, 0.D0,0.D0,0.D0,0.D0,
173 D 0.D0, 15.D-3, 0.D0, 10.D0, -1.D0, 0.D0, -1.D-4,
174 E 0.D0, 1.D0,
175 F 0.D0,0.D0, 6144.D-5, 10.D0, -1.D0, 4096.D0, -1.D6,
176 G 0.D0, 1.D0,
177 H 0.D0,0.D0,15.D0,10.D0,-1.D0, 5.D-5, 0.D0,1.D0,0.D0,
178 I 0.D0,0.D0, 15.D0, 10.D0, -1. D0, 5.D5, -4096.D0,
179 J 1.D0, 4096.D-6,
180 K 0.D0,0.D0, 7.D0, 4.D0, 0.D0,0.D0, -.5D0, -.25D0, 0.D0/
181* 4096 = 2 ** 12
182 DATA D12 /4096.D0/
183 DTRUE(1,1) = 12.D0 / 130.D0
184 DTRUE(2,1) = 36.D0 / 130.D0
185 DTRUE(7,1) = -1.D0 / 6.D0
186 DTRUE(1,2) = 14.D0 / 75.D0
187 DTRUE(2,2) = 49.D0 / 75.D0
188 DTRUE(9,2) = 1.D0 / 7.D0
189 DTRUE(1,5) = 45.D-11 * (D12 * D12)
190 DTRUE(3,5) = 4.D5 / (3.D0 * D12)
191 DTRUE(6,5) = 1.D0 / D12
192 DTRUE(8,5) = 1.D4 / (3.D0 * D12)
193 DTRUE(1,6) = 4.D10 / (1.5D0 * D12 * D12)
194 DTRUE(2,6) = 2.D-2 / 1.5D0
195 DTRUE(8,6) = 5.D-7 * D12
196 DTRUE(1,7) = 4.D0 / 150.D0
197 DTRUE(2,7) = (2.D-10 / 1.5D0) * (D12 * D12)
198 DTRUE(7,7) = -DTRUE(6,5)
199 DTRUE(9,7) = 1.D4 / D12
200 DTRUE(1,8) = DTRUE(1,7)
201 DTRUE(2,8) = 2.D10 / (1.5D0 * D12 * D12)
202 DTRUE(1,9) = 32.D0 / 7.D0
203 DTRUE(2,9) = -16.D0 / 7.D0
204* .. Executable Statements ..
205*
206* Compute true values which cannot be prestored
207* in decimal notation
208*
209 DBTRUE(1) = 1.0D0/0.6D0
210 DBTRUE(3) = -1.0D0/0.6D0
211 DBTRUE(5) = 1.0D0/0.6D0
212*
213 DO 20 K = 1, 8
214* .. Set N=K for identification in output if any ..
215 N = K
216 IF (ICASE.EQ.3) THEN
217* .. DROTG ..
218 IF (K.GT.8) GO TO 40
219 SA = DA1(K)
220 SB = DB1(K)
221 CALL DROTG(SA,SB,SC,SS)
222 CALL STEST1(SA,DATRUE(K),DATRUE(K),SFAC)
223 CALL STEST1(SB,DBTRUE(K),DBTRUE(K),SFAC)
224 CALL STEST1(SC,DC1(K),DC1(K),SFAC)
225 CALL STEST1(SS,DS1(K),DS1(K),SFAC)
226 ELSEIF (ICASE.EQ.11) THEN
227* .. DROTMG ..
228 DO I=1,4
229 DTEMP(I)= DAB(I,K)
230 DTEMP(I+4) = 0.0
231 END DO
232 DTEMP(9) = 0.0
233 CALL DROTMG(DTEMP(1),DTEMP(2),DTEMP(3),DTEMP(4),DTEMP(5))
234 CALL STEST(9,DTEMP,DTRUE(1,K),DTRUE(1,K),SFAC)
235 ELSE
236 WRITE (NOUT,*) ' Shouldn''t be here in CHECK0'
237 STOP
238 END IF
239 20 CONTINUE
240 40 RETURN
241 END
242 SUBROUTINE CHECK1(SFAC)
243* .. Parameters ..
244 INTEGER NOUT
245 PARAMETER (NOUT=6)
246* .. Scalar Arguments ..
247 DOUBLE PRECISION SFAC
248* .. Scalars in Common ..
249 INTEGER ICASE, INCX, INCY, N
250 LOGICAL PASS
251* .. Local Scalars ..
252 INTEGER I, LEN, NP1
253* .. Local Arrays ..
254 DOUBLE PRECISION DTRUE1(5), DTRUE3(5), DTRUE5(8,5,2), DV(8,5,2),
255 + SA(10), STEMP(1), STRUE(8), SX(8)
256 INTEGER ITRUE2(5)
257* .. External Functions ..
258 DOUBLE PRECISION DASUM, DNRM2
259 INTEGER IDAMAX
260 EXTERNAL DASUM, DNRM2, IDAMAX
261* .. External Subroutines ..
262 EXTERNAL ITEST1, DSCAL, STEST, STEST1
263* .. Intrinsic Functions ..
264 INTRINSIC MAX
265* .. Common blocks ..
266 COMMON /COMBLA/ICASE, N, INCX, INCY, PASS
267* .. Data statements ..
268 DATA SA/0.3D0, -1.0D0, 0.0D0, 1.0D0, 0.3D0, 0.3D0,
269 + 0.3D0, 0.3D0, 0.3D0, 0.3D0/
270 DATA DV/0.1D0, 2.0D0, 2.0D0, 2.0D0, 2.0D0, 2.0D0,
271 + 2.0D0, 2.0D0, 0.3D0, 3.0D0, 3.0D0, 3.0D0, 3.0D0,
272 + 3.0D0, 3.0D0, 3.0D0, 0.3D0, -0.4D0, 4.0D0,
273 + 4.0D0, 4.0D0, 4.0D0, 4.0D0, 4.0D0, 0.2D0,
274 + -0.6D0, 0.3D0, 5.0D0, 5.0D0, 5.0D0, 5.0D0,
275 + 5.0D0, 0.1D0, -0.3D0, 0.5D0, -0.1D0, 6.0D0,
276 + 6.0D0, 6.0D0, 6.0D0, 0.1D0, 8.0D0, 8.0D0, 8.0D0,
277 + 8.0D0, 8.0D0, 8.0D0, 8.0D0, 0.3D0, 9.0D0, 9.0D0,
278 + 9.0D0, 9.0D0, 9.0D0, 9.0D0, 9.0D0, 0.3D0, 2.0D0,
279 + -0.4D0, 2.0D0, 2.0D0, 2.0D0, 2.0D0, 2.0D0,
280 + 0.2D0, 3.0D0, -0.6D0, 5.0D0, 0.3D0, 2.0D0,
281 + 2.0D0, 2.0D0, 0.1D0, 4.0D0, -0.3D0, 6.0D0,
282 + -0.5D0, 7.0D0, -0.1D0, 3.0D0/
283 DATA DTRUE1/0.0D0, 0.3D0, 0.5D0, 0.7D0, 0.6D0/
284 DATA DTRUE3/0.0D0, 0.3D0, 0.7D0, 1.1D0, 1.0D0/
285 DATA DTRUE5/0.10D0, 2.0D0, 2.0D0, 2.0D0, 2.0D0,
286 + 2.0D0, 2.0D0, 2.0D0, -0.3D0, 3.0D0, 3.0D0,
287 + 3.0D0, 3.0D0, 3.0D0, 3.0D0, 3.0D0, 0.0D0, 0.0D0,
288 + 4.0D0, 4.0D0, 4.0D0, 4.0D0, 4.0D0, 4.0D0,
289 + 0.20D0, -0.60D0, 0.30D0, 5.0D0, 5.0D0, 5.0D0,
290 + 5.0D0, 5.0D0, 0.03D0, -0.09D0, 0.15D0, -0.03D0,
291 + 6.0D0, 6.0D0, 6.0D0, 6.0D0, 0.10D0, 8.0D0,
292 + 8.0D0, 8.0D0, 8.0D0, 8.0D0, 8.0D0, 8.0D0,
293 + 0.09D0, 9.0D0, 9.0D0, 9.0D0, 9.0D0, 9.0D0,
294 + 9.0D0, 9.0D0, 0.09D0, 2.0D0, -0.12D0, 2.0D0,
295 + 2.0D0, 2.0D0, 2.0D0, 2.0D0, 0.06D0, 3.0D0,
296 + -0.18D0, 5.0D0, 0.09D0, 2.0D0, 2.0D0, 2.0D0,
297 + 0.03D0, 4.0D0, -0.09D0, 6.0D0, -0.15D0, 7.0D0,
298 + -0.03D0, 3.0D0/
299 DATA ITRUE2/0, 1, 2, 2, 3/
300* .. Executable Statements ..
301 DO 80 INCX = 1, 2
302 DO 60 NP1 = 1, 5
303 N = NP1 - 1
304 LEN = 2*MAX(N,1)
305* .. Set vector arguments ..
306 DO 20 I = 1, LEN
307 SX(I) = DV(I,NP1,INCX)
308 20 CONTINUE
309*
310 IF (ICASE.EQ.7) THEN
311* .. DNRM2 ..
312 STEMP(1) = DTRUE1(NP1)
313 CALL STEST1(DNRM2(N,SX,INCX),STEMP(1),STEMP,SFAC)
314 ELSE IF (ICASE.EQ.8) THEN
315* .. DASUM ..
316 STEMP(1) = DTRUE3(NP1)
317 CALL STEST1(DASUM(N,SX,INCX),STEMP(1),STEMP,SFAC)
318 ELSE IF (ICASE.EQ.9) THEN
319* .. DSCAL ..
320 CALL DSCAL(N,SA((INCX-1)*5+NP1),SX,INCX)
321 DO 40 I = 1, LEN
322 STRUE(I) = DTRUE5(I,NP1,INCX)
323 40 CONTINUE
324 CALL STEST(LEN,SX,STRUE,STRUE,SFAC)
325 ELSE IF (ICASE.EQ.10) THEN
326* .. IDAMAX ..
327 CALL ITEST1(IDAMAX(N,SX,INCX),ITRUE2(NP1))
328 ELSE
329 WRITE (NOUT,*) ' Shouldn''t be here in CHECK1'
330 STOP
331 END IF
332 60 CONTINUE
333 80 CONTINUE
334 RETURN
335 END
336 SUBROUTINE CHECK2(SFAC)
337* .. Parameters ..
338 INTEGER NOUT
339 PARAMETER (NOUT=6)
340* .. Scalar Arguments ..
341 DOUBLE PRECISION SFAC
342* .. Scalars in Common ..
343 INTEGER ICASE, INCX, INCY, N
344 LOGICAL PASS
345* .. Local Scalars ..
346 DOUBLE PRECISION SA
347 INTEGER I, J, KI, KN, KNI, KPAR, KSIZE, LENX, LENY,
348 $ MX, MY
349* .. Local Arrays ..
350 DOUBLE PRECISION DT10X(7,4,4), DT10Y(7,4,4), DT7(4,4),
351 $ DT8(7,4,4), DX1(7),
352 $ DY1(7), SSIZE1(4), SSIZE2(14,2), SSIZE(7),
353 $ STX(7), STY(7), SX(7), SY(7),
354 $ DPAR(5,4), DT19X(7,4,16),DT19XA(7,4,4),
355 $ DT19XB(7,4,4), DT19XC(7,4,4),DT19XD(7,4,4),
356 $ DT19Y(7,4,16), DT19YA(7,4,4),DT19YB(7,4,4),
357 $ DT19YC(7,4,4), DT19YD(7,4,4), DTEMP(5)
358 INTEGER INCXS(4), INCYS(4), LENS(4,2), NS(4)
359* .. External Functions ..
360 DOUBLE PRECISION DDOT, DSDOT
361 EXTERNAL DDOT, DSDOT
362* .. External Subroutines ..
363 EXTERNAL DAXPY, DCOPY, DROTM, DSWAP, STEST, STEST1
364* .. Intrinsic Functions ..
365 INTRINSIC ABS, MIN
366* .. Common blocks ..
367 COMMON /COMBLA/ICASE, N, INCX, INCY, PASS
368* .. Data statements ..
369 EQUIVALENCE (DT19X(1,1,1),DT19XA(1,1,1)),(DT19X(1,1,5),
370 A DT19XB(1,1,1)),(DT19X(1,1,9),DT19XC(1,1,1)),
371 B (DT19X(1,1,13),DT19XD(1,1,1))
372 EQUIVALENCE (DT19Y(1,1,1),DT19YA(1,1,1)),(DT19Y(1,1,5),
373 A DT19YB(1,1,1)),(DT19Y(1,1,9),DT19YC(1,1,1)),
374 B (DT19Y(1,1,13),DT19YD(1,1,1))
375
376 DATA SA/0.3D0/
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/
380 DATA NS/0, 1, 2, 4/
381 DATA DX1/0.6D0, 0.1D0, -0.5D0, 0.8D0, 0.9D0, -0.3D0,
382 + -0.4D0/
383 DATA DY1/0.5D0, -0.9D0, 0.3D0, 0.7D0, -0.6D0, 0.2D0,
384 + 0.8D0/
385 DATA DT7/0.0D0, 0.30D0, 0.21D0, 0.62D0, 0.0D0,
386 + 0.30D0, -0.07D0, 0.85D0, 0.0D0, 0.30D0, -0.79D0,
387 + -0.74D0, 0.0D0, 0.30D0, 0.33D0, 1.27D0/
388 DATA DT8/0.5D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,
389 + 0.0D0, 0.68D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,
390 + 0.0D0, 0.0D0, 0.68D0, -0.87D0, 0.0D0, 0.0D0,
391 + 0.0D0, 0.0D0, 0.0D0, 0.68D0, -0.87D0, 0.15D0,
392 + 0.94D0, 0.0D0, 0.0D0, 0.0D0, 0.5D0, 0.0D0,
393 + 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.68D0,
394 + 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,
395 + 0.35D0, -0.9D0, 0.48D0, 0.0D0, 0.0D0, 0.0D0,
396 + 0.0D0,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0.6D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,
440 + 0.0D0, 0.6D0, -0.9D0, 0.1D0, 0.0D0, 0.0D0,
441 + 0.0D0, 0.0D0, 0.6D0, -0.9D0, 0.1D0, 0.7D0,
442 + -0.5D0, 0.2D0, 0.8D0/
443 DATA SSIZE1/0.0D0, 0.3D0, 1.6D0, 3.2D0/
444 DATA SSIZE2/0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,
445 + 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,
446 + 0.0D0, 1.17D0, 1.17D0, 1.17D0, 1.17D0, 1.17D0,
447 + 1.17D0, 1.17D0, 1.17D0, 1.17D0, 1.17D0, 1.17D0,
448 + 1.17D0, 1.17D0, 1.17D0/
449*
450* FOR DROTM
451*
452 DATA DPAR/-2.D0, 0.D0,0.D0,0.D0,0.D0,
453 A -1.D0, 2.D0, -3.D0, -4.D0, 5.D0,
454 B 0.D0, 0.D0, 2.D0, -3.D0, 0.D0,
455 C 1.D0, 5.D0, 2.D0, 0.D0, -4.D0/
456* TRUE X RESULTS F0R ROTATIONS DROTM
457 DATA DT19XA/.6D0, 0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,
458 A .6D0, 0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,
459 B .6D0, 0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,
460 C .6D0, 0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,
461 D .6D0, 0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,
462 E -.8D0, 0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,
463 F -.9D0, 0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,
464 G 3.5D0, 0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,
465 H .6D0, .1D0, 0.D0,0.D0,0.D0,0.D0,0.D0,
466 I -.8D0, 3.8D0, 0.D0,0.D0,0.D0,0.D0,0.D0,
467 J -.9D0, 2.8D0, 0.D0,0.D0,0.D0,0.D0,0.D0,
468 K 3.5D0, -.4D0, 0.D0,0.D0,0.D0,0.D0,0.D0,
469 L .6D0, .1D0, -.5D0, .8D0, 0.D0,0.D0,0.D0,
470 M -.8D0, 3.8D0, -2.2D0, -1.2D0, 0.D0,0.D0,0.D0,
471 N -.9D0, 2.8D0, -1.4D0, -1.3D0, 0.D0,0.D0,0.D0,
472 O 3.5D0, -.4D0, -2.2D0, 4.7D0, 0.D0,0.D0,0.D0/
473*
474 DATA DT19XB/.6D0, 0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,
475 A .6D0, 0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,
476 B .6D0, 0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,
477 C .6D0, 0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,
478 D .6D0, 0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,
479 E -.8D0, 0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,
480 F -.9D0, 0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,
481 G 3.5D0, 0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,
482 H .6D0, .1D0, -.5D0, 0.D0,0.D0,0.D0,0.D0,
483 I 0.D0, .1D0, -3.0D0, 0.D0,0.D0,0.D0,0.D0,
484 J -.3D0, .1D0, -2.0D0, 0.D0,0.D0,0.D0,0.D0,
485 K 3.3D0, .1D0, -2.0D0, 0.D0,0.D0,0.D0,0.D0,
486 L .6D0, .1D0, -.5D0, .8D0, .9D0, -.3D0, -.4D0,
487 M -2.0D0, .1D0, 1.4D0, .8D0, .6D0, -.3D0, -2.8D0,
488 N -1.8D0, .1D0, 1.3D0, .8D0, 0.D0, -.3D0, -1.9D0,
489 O 3.8D0, .1D0, -3.1D0, .8D0, 4.8D0, -.3D0, -1.5D0 /
490*
491 DATA DT19XC/.6D0, 0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,
492 A .6D0, 0.D0,0.D0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.D0,0.D0,0.D0,0.D0,
518 J -.9D0, -.8D0, 0.D0,0.D0,0.D0,0.D0,0.D0,
519 K 3.5D0, .8D0, 0.D0,0.D0,0.D0,0.D0,0.D0,
520 L .6D0, .1D0, -.5D0, .8D0, 0.D0,0.D0,0.D0,
521 M -.8D0, -1.0D0, 1.4D0, -1.6D0, 0.D0,0.D0,0.D0,
522 N -.9D0, -.8D0, 1.3D0, -1.6D0, 0.D0,0.D0,0.D0,
523 O 3.5D0, .8D0, -3.1D0, 4.8D0, 0.D0,0.D0,0.D0/
524* TRUE Y RESULTS FOR ROTATIONS DROTM
525 DATA DT19YA/.5D0, 0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,
526 A .5D0, 0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,
527 B .5D0, 0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,
528 C .5D0, 0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,
529 D .5D0, 0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,
530 E .7D0, 0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,
531 F 1.7D0, 0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,
532 G -2.6D0, 0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,
533 H .5D0, -.9D0, 0.D0,0.D0,0.D0,0.D0,0.D0,
534 I .7D0, -4.8D0, 0.D0,0.D0,0.D0,0.D0,0.D0,
535 J 1.7D0, -.7D0, 0.D0,0.D0,0.D0,0.D0,0.D0,
536 K -2.6D0, 3.5D0, 0.D0,0.D0,0.D0,0.D0,0.D0,
537 L .5D0, -.9D0, .3D0, .7D0, 0.D0,0.D0,0.D0,
538 M .7D0, -4.8D0, 3.0D0, 1.1D0, 0.D0,0.D0,0.D0,
539 N 1.7D0, -.7D0, -.7D0, 2.3D0, 0.D0,0.D0,0.D0,
540 O -2.6D0, 3.5D0, -.7D0, -3.6D0, 0.D0,0.D0,0.D0/
541*
542 DATA DT19YB/.5D0, 0.D0,0.D0,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0.D0,0.D0,0.D0,
568 I 4.0D0, -6.3D0, 0.D0,0.D0,0.D0,0.D0,0.D0,
569 J -.5D0, .3D0, 0.D0,0.D0,0.D0,0.D0,0.D0,
570 K -1.5D0, 3.0D0, 0.D0,0.D0,0.D0,0.D0,0.D0,
571 L .5D0, -.9D0, .3D0, .7D0, 0.D0,0.D0,0.D0,
572 M 3.7D0, -7.2D0, 3.0D0, 1.7D0, 0.D0,0.D0,0.D0,
573 N -.3D0, .9D0, -.7D0, 1.9D0, 0.D0,0.D0,0.D0,
574 O -1.6D0, 2.7D0, -.7D0, -3.4D0, 0.D0,0.D0,0.D0/
575*
576 DATA DT19YD/.5D0, 0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,
577 A .5D0, 0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,
578 B .5D0, 0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,
579 C .5D0, 0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,
580 D .5D0, 0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,
581 E .7D0, 0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,
582 F 1.7D0, 0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,
583 G -2.6D0, 0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,
584 H .5D0, -.9D0, .3D0, 0.D0,0.D0,0.D0,0.D0,
585 I .7D0, -.9D0, 1.2D0, 0.D0,0.D0,0.D0,0.D0,
586 J 1.7D0, -.9D0, .5D0, 0.D0,0.D0,0.D0,0.D0,
587 K -2.6D0, -.9D0, -1.3D0, 0.D0,0.D0,0.D0,0.D0,
588 L .5D0, -.9D0, .3D0, .7D0, -.6D0, .2D0, .8D0,
589 M .7D0, -.9D0, 1.2D0, .7D0, -1.5D0, .2D0, 1.6D0,
590 N 1.7D0, -.9D0, .5D0, .7D0, -1.6D0, .2D0, 2.4D0,
591 O -2.6D0, -.9D0, -1.3D0, .7D0, 2.9D0, .2D0, -4.0D0 /
592*
593* .. Executable Statements ..
594*
595 DO 120 KI = 1, 4
596 INCX = INCXS(KI)
597 INCY = INCYS(KI)
598 MX = ABS(INCX)
599 MY = ABS(INCY)
600*
601 DO 100 KN = 1, 4
602 N = NS(KN)
603 KSIZE = MIN(2,KN)
604 LENX = LENS(KN,MX)
605 LENY = LENS(KN,MY)
606* .. Initialize all argument arrays ..
607 DO 20 I = 1, 7
608 SX(I) = DX1(I)
609 SY(I) = DY1(I)
610 20 CONTINUE
611*
612 IF (ICASE.EQ.1) THEN
613* .. DDOT ..
614 CALL STEST1(DDOT(N,SX,INCX,SY,INCY),DT7(KN,KI),SSIZE1(KN)
615 + ,SFAC)
616 ELSE IF (ICASE.EQ.2) THEN
617* .. DAXPY ..
618 CALL DAXPY(N,SA,SX,INCX,SY,INCY)
619 DO 40 J = 1, LENY
620 STY(J) = DT8(J,KN,KI)
621 40 CONTINUE
622 CALL STEST(LENY,SY,STY,SSIZE2(1,KSIZE),SFAC)
623 ELSE IF (ICASE.EQ.5) THEN
624* .. DCOPY ..
625 DO 60 I = 1, 7
626 STY(I) = DT10Y(I,KN,KI)
627 60 CONTINUE
628 CALL DCOPY(N,SX,INCX,SY,INCY)
629 CALL STEST(LENY,SY,STY,SSIZE2(1,1),1.0D0)
630 ELSE IF (ICASE.EQ.6) THEN
631* .. DSWAP ..
632 CALL DSWAP(N,SX,INCX,SY,INCY)
633 DO 80 I = 1, 7
634 STX(I) = DT10X(I,KN,KI)
635 STY(I) = DT10Y(I,KN,KI)
636 80 CONTINUE
637 CALL STEST(LENX,SX,STX,SSIZE2(1,1),1.0D0)
638 CALL STEST(LENY,SY,STY,SSIZE2(1,1),1.0D0)
639 ELSE IF (ICASE.EQ.12) THEN
640* .. DROTM ..
641 KNI=KN+4*(KI-1)
642 DO KPAR=1,4
643 DO I=1,7
644 SX(I) = DX1(I)
645 SY(I) = DY1(I)
646 STX(I)= DT19X(I,KPAR,KNI)
647 STY(I)= DT19Y(I,KPAR,KNI)
648 END DO
649*
650 DO I=1,5
651 DTEMP(I) = DPAR(I,KPAR)
652 END DO
653*
654 DO I=1,LENX
655 SSIZE(I)=STX(I)
656 END DO
657* SEE REMARK ABOVE ABOUT DT11X(1,2,7)
658* AND DT11X(5,3,8).
659 IF ((KPAR .EQ. 2) .AND. (KNI .EQ. 7))
660 $ SSIZE(1) = 2.4D0
661 IF ((KPAR .EQ. 3) .AND. (KNI .EQ. 8))
662 $ SSIZE(5) = 1.8D0
663*
664 CALL DROTM(N,SX,INCX,SY,INCY,DTEMP)
665 CALL STEST(LENX,SX,STX,SSIZE,SFAC)
666 CALL STEST(LENY,SY,STY,STY,SFAC)
667 END DO
668 ELSE IF (ICASE.EQ.13) THEN
669* .. DSDOT ..
670 CALL TESTDSDOT(REAL(DSDOT(N,REAL(SX),INCX,REAL(SY),INCY)),
671 $ REAL(DT7(KN,KI)),REAL(SSIZE1(KN)), .3125E-1)
672 ELSE
673 WRITE (NOUT,*) ' Shouldn''t be here in CHECK2'
674 STOP
675 END IF
676 100 CONTINUE
677 120 CONTINUE
678 RETURN
679 END
680 SUBROUTINE CHECK3(SFAC)
681* .. Parameters ..
682 INTEGER NOUT
683 PARAMETER (NOUT=6)
684* .. Scalar Arguments ..
685 DOUBLE PRECISION SFAC
686* .. Scalars in Common ..
687 INTEGER ICASE, INCX, INCY, N
688 LOGICAL PASS
689* .. Local Scalars ..
690 DOUBLE PRECISION SC, SS
691 INTEGER I, K, KI, KN, KSIZE, LENX, LENY, MX, MY
692* .. Local Arrays ..
693 DOUBLE PRECISION COPYX(5), COPYY(5), DT9X(7,4,4), DT9Y(7,4,4),
694 + DX1(7), DY1(7), MWPC(11), MWPS(11), MWPSTX(5),
695 + MWPSTY(5), MWPTX(11,5), MWPTY(11,5), MWPX(5),
696 + MWPY(5), SSIZE2(14,2), STX(7), STY(7), SX(7),
697 + SY(7)
698 INTEGER INCXS(4), INCYS(4), LENS(4,2), MWPINX(11),
699 + MWPINY(11), MWPN(11), NS(4)
700* .. External Subroutines ..
701 EXTERNAL DROT, STEST
702* .. Intrinsic Functions ..
703 INTRINSIC ABS, MIN
704* .. Common blocks ..
705 COMMON /COMBLA/ICASE, N, INCX, INCY, PASS
706* .. Data statements ..
707 DATA INCXS/1, 2, -2, -1/
708 DATA INCYS/1, -2, 1, -2/
709 DATA LENS/1, 1, 2, 4, 1, 1, 3, 7/
710 DATA NS/0, 1, 2, 4/
711 DATA DX1/0.6D0, 0.1D0, -0.5D0, 0.8D0, 0.9D0, -0.3D0,
712 + -0.4D0/
713 DATA DY1/0.5D0, -0.9D0, 0.3D0, 0.7D0, -0.6D0, 0.2D0,
714 + 0.8D0/
715 DATA SC, SS/0.8D0, 0.6D0/
716 DATA DT9X/0.6D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,
717 + 0.0D0, 0.78D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,
718 + 0.0D0, 0.0D0, 0.78D0, -0.46D0, 0.0D0, 0.0D0,
719 + 0.0D0, 0.0D0, 0.0D0, 0.78D0, -0.46D0, -0.22D0,
720 + 1.06D0, 0.0D0, 0.0D0, 0.0D0, 0.6D0, 0.0D0,
721 + 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.78D0,
722 + 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,
723 + 0.66D0, 0.1D0, -0.1D0, 0.0D0, 0.0D0, 0.0D0,
724 + 0.0D0, 0.96D0, 0.1D0, -0.76D0, 0.8D0, 0.90D0,
725 + -0.3D0, -0.02D0, 0.6D0, 0.0D0, 0.0D0, 0.0D0,
726 + 0.0D0, 0.0D0, 0.0D0, 0.78D0, 0.0D0, 0.0D0,
727 + 0.0D0, 0.0D0, 0.0D0, 0.0D0, -0.06D0, 0.1D0,
728 + -0.1D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.90D0,
729 + 0.1D0, -0.22D0, 0.8D0, 0.18D0, -0.3D0, -0.02D0,
730 + 0.6D0, 0.0D0, 0.0D0, 0.0D0,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0,
753 + -0.18D0, 0.2D0, 0.16D0/
754 DATA SSIZE2/0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,
755 + 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,
756 + 0.0D0, 1.17D0, 1.17D0, 1.17D0, 1.17D0, 1.17D0,
757 + 1.17D0, 1.17D0, 1.17D0, 1.17D0, 1.17D0, 1.17D0,
758 + 1.17D0, 1.17D0, 1.17D0/
759* .. Executable Statements ..
760*
761 DO 60 KI = 1, 4
762 INCX = INCXS(KI)
763 INCY = INCYS(KI)
764 MX = ABS(INCX)
765 MY = ABS(INCY)
766*
767 DO 40 KN = 1, 4
768 N = NS(KN)
769 KSIZE = MIN(2,KN)
770 LENX = LENS(KN,MX)
771 LENY = LENS(KN,MY)
772*
773 IF (ICASE.EQ.4) THEN
774* .. DROT ..
775 DO 20 I = 1, 7
776 SX(I) = DX1(I)
777 SY(I) = DY1(I)
778 STX(I) = DT9X(I,KN,KI)
779 STY(I) = DT9Y(I,KN,KI)
780 20 CONTINUE
781 CALL DROT(N,SX,INCX,SY,INCY,SC,SS)
782 CALL STEST(LENX,SX,STX,SSIZE2(1,KSIZE),SFAC)
783 CALL STEST(LENY,SY,STY,SSIZE2(1,KSIZE),SFAC)
784 ELSE
785 WRITE (NOUT,*) ' Shouldn''t be here in CHECK3'
786 STOP
787 END IF
788 40 CONTINUE
789 60 CONTINUE
790*
791 MWPC(1) = 1
792 DO 80 I = 2, 11
793 MWPC(I) = 0
794 80 CONTINUE
795 MWPS(1) = 0
796 DO 100 I = 2, 6
797 MWPS(I) = 1
798 100 CONTINUE
799 DO 120 I = 7, 11
800 MWPS(I) = -1
801 120 CONTINUE
802 MWPINX(1) = 1
803 MWPINX(2) = 1
804 MWPINX(3) = 1
805 MWPINX(4) = -1
806 MWPINX(5) = 1
807 MWPINX(6) = -1
808 MWPINX(7) = 1
809 MWPINX(8) = 1
810 MWPINX(9) = -1
811 MWPINX(10) = 1
812 MWPINX(11) = -1
813 MWPINY(1) = 1
814 MWPINY(2) = 1
815 MWPINY(3) = -1
816 MWPINY(4) = -1
817 MWPINY(5) = 2
818 MWPINY(6) = 1
819 MWPINY(7) = 1
820 MWPINY(8) = -1
821 MWPINY(9) = -1
822 MWPINY(10) = 2
823 MWPINY(11) = 1
824 DO 140 I = 1, 11
825 MWPN(I) = 5
826 140 CONTINUE
827 MWPN(5) = 3
828 MWPN(10) = 3
829 DO 160 I = 1, 5
830 MWPX(I) = I
831 MWPY(I) = I
832 MWPTX(1,I) = I
833 MWPTY(1,I) = I
834 MWPTX(2,I) = I
835 MWPTY(2,I) = -I
836 MWPTX(3,I) = 6 - I
837 MWPTY(3,I) = I - 6
838 MWPTX(4,I) = I
839 MWPTY(4,I) = -I
840 MWPTX(6,I) = 6 - I
841 MWPTY(6,I) = I - 6
842 MWPTX(7,I) = -I
843 MWPTY(7,I) = I
844 MWPTX(8,I) = I - 6
845 MWPTY(8,I) = 6 - I
846 MWPTX(9,I) = -I
847 MWPTY(9,I) = I
848 MWPTX(11,I) = I - 6
849 MWPTY(11,I) = 6 - I
850 160 CONTINUE
851 MWPTX(5,1) = 1
852 MWPTX(5,2) = 3
853 MWPTX(5,3) = 5
854 MWPTX(5,4) = 4
855 MWPTX(5,5) = 5
856 MWPTY(5,1) = -1
857 MWPTY(5,2) = 2
858 MWPTY(5,3) = -2
859 MWPTY(5,4) = 4
860 MWPTY(5,5) = -3
861 MWPTX(10,1) = -1
862 MWPTX(10,2) = -3
863 MWPTX(10,3) = -5
864 MWPTX(10,4) = 4
865 MWPTX(10,5) = 5
866 MWPTY(10,1) = 1
867 MWPTY(10,2) = 2
868 MWPTY(10,3) = 2
869 MWPTY(10,4) = 4
870 MWPTY(10,5) = 3
871 DO 200 I = 1, 11
872 INCX = MWPINX(I)
873 INCY = MWPINY(I)
874 DO 180 K = 1, 5
875 COPYX(K) = MWPX(K)
876 COPYY(K) = MWPY(K)
877 MWPSTX(K) = MWPTX(I,K)
878 MWPSTY(K) = MWPTY(I,K)
879 180 CONTINUE
880 CALL DROT(MWPN(I),COPYX,INCX,COPYY,INCY,MWPC(I),MWPS(I))
881 CALL STEST(5,COPYX,MWPSTX,MWPSTX,SFAC)
882 CALL STEST(5,COPYY,MWPSTY,MWPSTY,SFAC)
883 200 CONTINUE
884 RETURN
885 END
886 SUBROUTINE STEST(LEN,SCOMP,STRUE,SSIZE,SFAC)
887* ********************************* STEST **************************
888*
889* THIS SUBR COMPARES ARRAYS SCOMP() AND STRUE() OF LENGTH LEN TO
890* SEE IF THE TERM BY TERM DIFFERENCES, MULTIPLIED BY SFAC, ARE
891* NEGLIGIBLE.
892*
893* C. L. LAWSON, JPL, 1974 DEC 10
894*
895* .. Parameters ..
896 INTEGER NOUT
897 DOUBLE PRECISION ZERO
898 PARAMETER (NOUT=6, ZERO=0.0D0)
899* .. Scalar Arguments ..
900 DOUBLE PRECISION SFAC
901 INTEGER LEN
902* .. Array Arguments ..
903 DOUBLE PRECISION SCOMP(LEN), SSIZE(LEN), STRUE(LEN)
904* .. Scalars in Common ..
905 INTEGER ICASE, INCX, INCY, N
906 LOGICAL PASS
907* .. Local Scalars ..
908 DOUBLE PRECISION SD
909 INTEGER I
910* .. External Functions ..
911 DOUBLE PRECISION SDIFF
912 EXTERNAL SDIFF
913* .. Intrinsic Functions ..
914 INTRINSIC ABS
915* .. Common blocks ..
916 COMMON /COMBLA/ICASE, N, INCX, INCY, PASS
917* .. Executable Statements ..
918*
919 DO 40 I = 1, LEN
920 SD = SCOMP(I) - STRUE(I)
921 IF (ABS(SFAC*SD) .LE. ABS(SSIZE(I))*EPSILON(ZERO))
922 + GO TO 40
923*
924* HERE SCOMP(I) IS NOT CLOSE TO STRUE(I).
925*
926 IF ( .NOT. PASS) GO TO 20
927* PRINT FAIL MESSAGE AND HEADER.
928 PASS = .FALSE.
929 WRITE (NOUT,99999)
930 WRITE (NOUT,99998)
931 20 WRITE (NOUT,99997) ICASE, N, INCX, INCY, I, SCOMP(I),
932 + STRUE(I), SD, SSIZE(I)
933 40 CONTINUE
934 RETURN
935*
93699999 FORMAT (' FAIL')
93799998 FORMAT (/' CASE N INCX INCY I ',
938 + ' COMP(I) TRUE(I) DIFFERENCE',
939 + ' SIZE(I)',/1X)
94099997 FORMAT (1X,I4,I3,2I5,I3,2D36.8,2D12.4)
941 END
942 SUBROUTINE TESTDSDOT(SCOMP,STRUE,SSIZE,SFAC)
943* ********************************* STEST **************************
944*
945* THIS SUBR COMPARES ARRAYS SCOMP() AND STRUE() OF LENGTH LEN TO
946* SEE IF THE TERM BY TERM DIFFERENCES, MULTIPLIED BY SFAC, ARE
947* NEGLIGIBLE.
948*
949* C. L. LAWSON, JPL, 1974 DEC 10
950*
951* .. Parameters ..
952 INTEGER NOUT
953 REAL ZERO
954 PARAMETER (NOUT=6, ZERO=0.0E0)
955* .. Scalar Arguments ..
956 REAL SFAC, SCOMP, SSIZE, STRUE
957* .. Scalars in Common ..
958 INTEGER ICASE, INCX, INCY, N
959 LOGICAL PASS
960* .. Local Scalars ..
961 REAL SD
962* .. Intrinsic Functions ..
963 INTRINSIC ABS
964* .. Common blocks ..
965 COMMON /COMBLA/ICASE, N, INCX, INCY, PASS
966* .. Executable Statements ..
967*
968 SD = SCOMP - STRUE
969 IF (ABS(SFAC*SD) .LE. ABS(SSIZE) * EPSILON(ZERO))
970 + GO TO 40
971*
972* HERE SCOMP(I) IS NOT CLOSE TO STRUE(I).
973*
974 IF ( .NOT. PASS) GO TO 20
975* PRINT FAIL MESSAGE AND HEADER.
976 PASS = .FALSE.
977 WRITE (NOUT,99999)
978 WRITE (NOUT,99998)
979 20 WRITE (NOUT,99997) ICASE, N, INCX, INCY, SCOMP,
980 + STRUE, SD, SSIZE
981 40 CONTINUE
982 RETURN
983*
98499999 FORMAT (' FAIL')
98599998 FORMAT (/' CASE N INCX INCY ',
986 + ' COMP(I) TRUE(I) DIFFERENCE',
987 + ' SIZE(I)',/1X)
98899997 FORMAT (1X,I4,I3,1I5,I3,2E36.8,2E12.4)
989 END
990 SUBROUTINE STEST1(SCOMP1,STRUE1,SSIZE,SFAC)
991* ************************* STEST1 *****************************
992*
993* THIS IS AN INTERFACE SUBROUTINE TO ACCOMODATE THE FORTRAN
994* REQUIREMENT THAT WHEN A DUMMY ARGUMENT IS AN ARRAY, THE
995* ACTUAL ARGUMENT MUST ALSO BE AN ARRAY OR AN ARRAY ELEMENT.
996*
997* C.L. LAWSON, JPL, 1978 DEC 6
998*
999* .. Scalar Arguments ..
1000 DOUBLE PRECISION SCOMP1, SFAC, STRUE1
1001* .. Array Arguments ..
1002 DOUBLE PRECISION SSIZE(*)
1003* .. Local Arrays ..
1004 DOUBLE PRECISION SCOMP(1), STRUE(1)
1005* .. External Subroutines ..
1006 EXTERNAL STEST
1007* .. Executable Statements ..
1008*
1009 SCOMP(1) = SCOMP1
1010 STRUE(1) = STRUE1
1011 CALL STEST(1,SCOMP,STRUE,SSIZE,SFAC)
1012*
1013 RETURN
1014 END
1015 DOUBLE PRECISION FUNCTION SDIFF(SA,SB)
1016* ********************************* SDIFF **************************
1017* COMPUTES DIFFERENCE OF TWO NUMBERS. C. L. LAWSON, JPL 1974 FEB 15
1018*
1019* .. Scalar Arguments ..
1020 DOUBLE PRECISION SA, SB
1021* .. Executable Statements ..
1022 SDIFF = SA - SB
1023 RETURN
1024 END
1025 SUBROUTINE ITEST1(ICOMP,ITRUE)
1026* ********************************* ITEST1 *************************
1027*
1028* THIS SUBROUTINE COMPARES THE VARIABLES ICOMP AND ITRUE FOR
1029* EQUALITY.
1030* C. L. LAWSON, JPL, 1974 DEC 10
1031*
1032* .. Parameters ..
1033 INTEGER NOUT
1034 PARAMETER (NOUT=6)
1035* .. Scalar Arguments ..
1036 INTEGER ICOMP, ITRUE
1037* .. Scalars in Common ..
1038 INTEGER ICASE, INCX, INCY, N
1039 LOGICAL PASS
1040* .. Local Scalars ..
1041 INTEGER ID
1042* .. Common blocks ..
1043 COMMON /COMBLA/ICASE, N, INCX, INCY, PASS
1044* .. Executable Statements ..
1045*
1046 IF (ICOMP.EQ.ITRUE) GO TO 40
1047*
1048* HERE ICOMP IS NOT EQUAL TO ITRUE.
1049*
1050 IF ( .NOT. PASS) GO TO 20
1051* PRINT FAIL MESSAGE AND HEADER.
1052 PASS = .FALSE.
1053 WRITE (NOUT,99999)
1054 WRITE (NOUT,99998)
1055 20 ID = ICOMP - ITRUE
1056 WRITE (NOUT,99997) ICASE, N, INCX, INCY, ICOMP, ITRUE, ID
1057 40 CONTINUE
1058 RETURN
1059*
106099999 FORMAT (' FAIL')
106199998 FORMAT (/' CASE N INCX INCY ',
1062 + ' COMP TRUE DIFFERENCE',
1063 + /1X)
106499997 FORMAT (1X,I4,I3,2I5,2I36,I12)
1065 END
Note: See TracBrowser for help on using the repository browser.