144
145 INTEGER NOUT
146 parameter(nout=6)
147
148 REAL SFAC
149
150 INTEGER ICASE, INCX, INCY, MODE, N
151 LOGICAL PASS
152
153 INTEGER I, LEN, NP1
154
155 REAL DTRUE1(5), DTRUE3(5), DTRUE5(8,5,2), DV(8,5,2),
156 + SA(10), STEMP(1), STRUE(8), SX(8)
157 INTEGER ITRUE2(5)
158
159 REAL SASUMTEST, SNRM2TEST
160 INTEGER ISAMAXTEST
161 EXTERNAL sasumtest, snrm2test, isamaxtest
162
164
165 INTRINSIC max
166
167 COMMON /combla/icase, n, incx, incy, mode, pass
168
169 DATA sa/0.3e0, -1.0e0, 0.0e0, 1.0e0, 0.3e0, 0.3e0,
170 + 0.3e0, 0.3e0, 0.3e0, 0.3e0/
171 DATA dv/0.1e0, 2.0e0, 2.0e0, 2.0e0, 2.0e0, 2.0e0,
172 + 2.0e0, 2.0e0, 0.3e0, 3.0e0, 3.0e0, 3.0e0, 3.0e0,
173 + 3.0e0, 3.0e0, 3.0e0, 0.3e0, -0.4e0, 4.0e0,
174 + 4.0e0, 4.0e0, 4.0e0, 4.0e0, 4.0e0, 0.2e0,
175 + -0.6e0, 0.3e0, 5.0e0, 5.0e0, 5.0e0, 5.0e0,
176 + 5.0e0, 0.1e0, -0.3e0, 0.5e0, -0.1e0, 6.0e0,
177 + 6.0e0, 6.0e0, 6.0e0, 0.1e0, 8.0e0, 8.0e0, 8.0e0,
178 + 8.0e0, 8.0e0, 8.0e0, 8.0e0, 0.3e0, 9.0e0, 9.0e0,
179 + 9.0e0, 9.0e0, 9.0e0, 9.0e0, 9.0e0, 0.3e0, 2.0e0,
180 + -0.4e0, 2.0e0, 2.0e0, 2.0e0, 2.0e0, 2.0e0,
181 + 0.2e0, 3.0e0, -0.6e0, 5.0e0, 0.3e0, 2.0e0,
182 + 2.0e0, 2.0e0, 0.1e0, 4.0e0, -0.3e0, 6.0e0,
183 + -0.5e0, 7.0e0, -0.1e0, 3.0e0/
184 DATA dtrue1/0.0e0, 0.3e0, 0.5e0, 0.7e0, 0.6e0/
185 DATA dtrue3/0.0e0, 0.3e0, 0.7e0, 1.1e0, 1.0e0/
186 DATA dtrue5/0.10e0, 2.0e0, 2.0e0, 2.0e0, 2.0e0,
187 + 2.0e0, 2.0e0, 2.0e0, -0.3e0, 3.0e0, 3.0e0,
188 + 3.0e0, 3.0e0, 3.0e0, 3.0e0, 3.0e0, 0.0e0, 0.0e0,
189 + 4.0e0, 4.0e0, 4.0e0, 4.0e0, 4.0e0, 4.0e0,
190 + 0.20e0, -0.60e0, 0.30e0, 5.0e0, 5.0e0, 5.0e0,
191 + 5.0e0, 5.0e0, 0.03e0, -0.09e0, 0.15e0, -0.03e0,
192 + 6.0e0, 6.0e0, 6.0e0, 6.0e0, 0.10e0, 8.0e0,
193 + 8.0e0, 8.0e0, 8.0e0, 8.0e0, 8.0e0, 8.0e0,
194 + 0.09e0, 9.0e0, 9.0e0, 9.0e0, 9.0e0, 9.0e0,
195 + 9.0e0, 9.0e0, 0.09e0, 2.0e0, -0.12e0, 2.0e0,
196 + 2.0e0, 2.0e0, 2.0e0, 2.0e0, 0.06e0, 3.0e0,
197 + -0.18e0, 5.0e0, 0.09e0, 2.0e0, 2.0e0, 2.0e0,
198 + 0.03e0, 4.0e0, -0.09e0, 6.0e0, -0.15e0, 7.0e0,
199 + -0.03e0, 3.0e0/
200 DATA itrue2/0, 1, 2, 2, 3/
201
202 DO 80 incx = 1, 2
203 DO 60 np1 = 1, 5
204 n = np1 - 1
205 len = 2*max(n,1)
206
207 DO 20 i = 1, len
208 sx(i) = dv(i,np1,incx)
209 20 CONTINUE
210
211 IF (icase.EQ.7) THEN
212
213 stemp(1) = dtrue1(np1)
214 CALL stest1(snrm2test(n,sx,incx),stemp(1),stemp,sfac)
215 ELSE IF (icase.EQ.8) THEN
216
217 stemp(1) = dtrue3(np1)
218 CALL stest1(sasumtest(n,sx,incx),stemp(1),stemp,sfac)
219 ELSE IF (icase.EQ.9) THEN
220
221 CALL sscaltest(n,sa((incx-1)*5+np1),sx,incx)
222 DO 40 i = 1, len
223 strue(i) = dtrue5(i,np1,incx)
224 40 CONTINUE
225 CALL stest(len,sx,strue,strue,sfac)
226 ELSE IF (icase.EQ.10) THEN
227
228 CALL itest1(isamaxtest(n,sx,incx),itrue2(np1))
229 ELSE
230 WRITE (nout,*) ' Shouldn''t be here in CHECK1'
231 stop
232 END IF
233 60 CONTINUE
234 80 CONTINUE
235 RETURN
subroutine stest(len, scomp, strue, ssize, sfac)
subroutine stest1(scomp1, strue1, ssize, sfac)
subroutine itest1(icomp, itrue)