82 REAL R( NMAX ), R1( NMAX ), R2( NMAX )
83 COMPLEX A( NMAX, NMAX ), AF( NMAX, NMAX ), B( NMAX ),
84 $ E( NMAX ), W( 2*NMAX ), X( NMAX )
106 COMMON / infoc / infot, nout, ok, lerr
107 COMMON / srnamc / srnamt
110 INTRINSIC cmplx, real
115 WRITE( nout, fmt = * )
122 a( i, j ) = cmplx( 1. / real( i+j ), -1. / real( i+j ) )
123 af( i, j ) = cmplx( 1. / real( i+j ), -1. / real( i+j ) )
136 IF(
lsamen( 2, c2,
'HE' ) )
THEN
146 CALL chetrf(
'/', 0, a, 1, ip, w, 1, info )
147 CALL chkxer(
'CHETRF', infot, nout, lerr, ok )
149 CALL chetrf(
'U', -1, a, 1, ip, w, 1, info )
150 CALL chkxer(
'CHETRF', infot, nout, lerr, ok )
152 CALL chetrf(
'U', 2, a, 1, ip, w, 4, info )
153 CALL chkxer(
'CHETRF', infot, nout, lerr, ok )
155 CALL chetrf(
'U', 0, a, 1, ip, w, 0, info )
156 CALL chkxer(
'CHETRF', infot, nout, lerr, ok )
158 CALL chetrf(
'U', 0, a, 1, ip, w, -2, info )
159 CALL chkxer(
'CHETRF', infot, nout, lerr, ok )
165 CALL chetf2(
'/', 0, a, 1, ip, info )
166 CALL chkxer(
'CHETF2', infot, nout, lerr, ok )
168 CALL chetf2(
'U', -1, a, 1, ip, info )
169 CALL chkxer(
'CHETF2', infot, nout, lerr, ok )
171 CALL chetf2(
'U', 2, a, 1, ip, info )
172 CALL chkxer(
'CHETF2', infot, nout, lerr, ok )
178 CALL chetri(
'/', 0, a, 1, ip, w, info )
179 CALL chkxer(
'CHETRI', infot, nout, lerr, ok )
181 CALL chetri(
'U', -1, a, 1, ip, w, info )
182 CALL chkxer(
'CHETRI', infot, nout, lerr, ok )
184 CALL chetri(
'U', 2, a, 1, ip, w, info )
185 CALL chkxer(
'CHETRI', infot, nout, lerr, ok )
191 CALL chetri2(
'/', 0, a, 1, ip, w, 1, info )
192 CALL chkxer(
'CHETRI2', infot, nout, lerr, ok )
194 CALL chetri2(
'U', -1, a, 1, ip, w, 1, info )
195 CALL chkxer(
'CHETRI2', infot, nout, lerr, ok )
197 CALL chetri2(
'U', 2, a, 1, ip, w, 1, info )
198 CALL chkxer(
'CHETRI2', infot, nout, lerr, ok )
204 CALL chetri2x(
'/', 0, a, 1, ip, w, 1, info )
205 CALL chkxer(
'CHETRI2X', infot, nout, lerr, ok )
207 CALL chetri2x(
'U', -1, a, 1, ip, w, 1, info )
208 CALL chkxer(
'CHETRI2X', infot, nout, lerr, ok )
210 CALL chetri2x(
'U', 2, a, 1, ip, w, 1, info )
211 CALL chkxer(
'CHETRI2X', infot, nout, lerr, ok )
217 CALL chetrs(
'/', 0, 0, a, 1, ip, b, 1, info )
218 CALL chkxer(
'CHETRS', infot, nout, lerr, ok )
220 CALL chetrs(
'U', -1, 0, a, 1, ip, b, 1, info )
221 CALL chkxer(
'CHETRS', infot, nout, lerr, ok )
223 CALL chetrs(
'U', 0, -1, a, 1, ip, b, 1, info )
224 CALL chkxer(
'CHETRS', infot, nout, lerr, ok )
226 CALL chetrs(
'U', 2, 1, a, 1, ip, b, 2, info )
227 CALL chkxer(
'CHETRS', infot, nout, lerr, ok )
229 CALL chetrs(
'U', 2, 1, a, 2, ip, b, 1, info )
230 CALL chkxer(
'CHETRS', infot, nout, lerr, ok )
236 CALL cherfs(
'/', 0, 0, a, 1, af, 1, ip, b, 1, x, 1, r1, r2, w,
238 CALL chkxer(
'CHERFS', infot, nout, lerr, ok )
240 CALL cherfs(
'U', -1, 0, a, 1, af, 1, ip, b, 1, x, 1, r1, r2,
242 CALL chkxer(
'CHERFS', infot, nout, lerr, ok )
244 CALL cherfs(
'U', 0, -1, a, 1, af, 1, ip, b, 1, x, 1, r1, r2,
246 CALL chkxer(
'CHERFS', infot, nout, lerr, ok )
248 CALL cherfs(
'U', 2, 1, a, 1, af, 2, ip, b, 2, x, 2, r1, r2, w,
250 CALL chkxer(
'CHERFS', infot, nout, lerr, ok )
252 CALL cherfs(
'U', 2, 1, a, 2, af, 1, ip, b, 2, x, 2, r1, r2, w,
254 CALL chkxer(
'CHERFS', infot, nout, lerr, ok )
256 CALL cherfs(
'U', 2, 1, a, 2, af, 2, ip, b, 1, x, 2, r1, r2, w,
258 CALL chkxer(
'CHERFS', infot, nout, lerr, ok )
260 CALL cherfs(
'U', 2, 1, a, 2, af, 2, ip, b, 2, x, 1, r1, r2, w,
262 CALL chkxer(
'CHERFS', infot, nout, lerr, ok )
268 CALL checon(
'/', 0, a, 1, ip, anrm, rcond, w, info )
269 CALL chkxer(
'CHECON', infot, nout, lerr, ok )
271 CALL checon(
'U', -1, a, 1, ip, anrm, rcond, w, info )
272 CALL chkxer(
'CHECON', infot, nout, lerr, ok )
274 CALL checon(
'U', 2, a, 1, ip, anrm, rcond, w, info )
275 CALL chkxer(
'CHECON', infot, nout, lerr, ok )
277 CALL checon(
'U', 1, a, 1, ip, -anrm, rcond, w, info )
278 CALL chkxer(
'CHECON', infot, nout, lerr, ok )
280 ELSE IF(
lsamen( 2, c2,
'HR' ) )
THEN
288 srnamt =
'CHETRF_ROOK'
291 CALL chkxer(
'CHETRF_ROOK', infot, nout, lerr, ok )
294 CALL chkxer(
'CHETRF_ROOK', infot, nout, lerr, ok )
297 CALL chkxer(
'CHETRF_ROOK', infot, nout, lerr, ok )
300 CALL chkxer(
'CHETRF_ROOK', infot, nout, lerr, ok )
303 CALL chkxer(
'CHETRF_ROOK', infot, nout, lerr, ok )
307 srnamt =
'CHETF2_ROOK'
310 CALL chkxer(
'CHETF2_ROOK', infot, nout, lerr, ok )
313 CALL chkxer(
'CHETF2_ROOK', infot, nout, lerr, ok )
316 CALL chkxer(
'CHETF2_ROOK', infot, nout, lerr, ok )
320 srnamt =
'CHETRI_ROOK'
323 CALL chkxer(
'CHETRI_ROOK', infot, nout, lerr, ok )
326 CALL chkxer(
'CHETRI_ROOK', infot, nout, lerr, ok )
329 CALL chkxer(
'CHETRI_ROOK', infot, nout, lerr, ok )
333 srnamt =
'CHETRS_ROOK'
335 CALL chetrs_rook(
'/', 0, 0, a, 1, ip, b, 1, info )
336 CALL chkxer(
'CHETRS_ROOK', infot, nout, lerr, ok )
338 CALL chetrs_rook(
'U', -1, 0, a, 1, ip, b, 1, info )
339 CALL chkxer(
'CHETRS_ROOK', infot, nout, lerr, ok )
341 CALL chetrs_rook(
'U', 0, -1, a, 1, ip, b, 1, info )
342 CALL chkxer(
'CHETRS_ROOK', infot, nout, lerr, ok )
344 CALL chetrs_rook(
'U', 2, 1, a, 1, ip, b, 2, info )
345 CALL chkxer(
'CHETRS_ROOK', infot, nout, lerr, ok )
347 CALL chetrs_rook(
'U', 2, 1, a, 2, ip, b, 1, info )
348 CALL chkxer(
'CHETRS_ROOK', infot, nout, lerr, ok )
352 srnamt =
'CHECON_ROOK'
354 CALL checon_rook(
'/', 0, a, 1, ip, anrm, rcond, w, info )
355 CALL chkxer(
'CHECON_ROOK', infot, nout, lerr, ok )
357 CALL checon_rook(
'U', -1, a, 1, ip, anrm, rcond, w, info )
358 CALL chkxer(
'CHECON_ROOK', infot, nout, lerr, ok )
360 CALL checon_rook(
'U', 2, a, 1, ip, anrm, rcond, w, info )
361 CALL chkxer(
'CHECON_ROOK', infot, nout, lerr, ok )
363 CALL checon_rook(
'U', 1, a, 1, ip, -anrm, rcond, w, info )
364 CALL chkxer(
'CHECON_ROOK', infot, nout, lerr, ok )
366 ELSE IF(
lsamen( 2, c2,
'HK' ) )
THEN
380 CALL chetrf_rk(
'/', 0, a, 1, e, ip, w, 1, info )
381 CALL chkxer(
'CHETRF_RK', infot, nout, lerr, ok )
383 CALL chetrf_rk(
'U', -1, a, 1, e, ip, w, 1, info )
384 CALL chkxer(
'CHETRF_RK', infot, nout, lerr, ok )
386 CALL chetrf_rk(
'U', 2, a, 1, e, ip, w, 4, info )
387 CALL chkxer(
'CHETRF_RK', infot, nout, lerr, ok )
389 CALL chetrf_rk(
'U', 0, a, 1, e, ip, w, 0, info )
390 CALL chkxer(
'CHETRF_RK', infot, nout, lerr, ok )
392 CALL chetrf_rk(
'U', 0, a, 1, e, ip, w, -2, info )
393 CALL chkxer(
'CHETRF_RK', infot, nout, lerr, ok )
399 CALL chetf2_rk(
'/', 0, a, 1, e, ip, info )
400 CALL chkxer(
'CHETF2_RK', infot, nout, lerr, ok )
402 CALL chetf2_rk(
'U', -1, a, 1, e, ip, info )
403 CALL chkxer(
'CHETF2_RK', infot, nout, lerr, ok )
405 CALL chetf2_rk(
'U', 2, a, 1, e, ip, info )
406 CALL chkxer(
'CHETF2_RK', infot, nout, lerr, ok )
412 CALL chetri_3(
'/', 0, a, 1, e, ip, w, 1, info )
413 CALL chkxer(
'CHETRI_3', infot, nout, lerr, ok )
415 CALL chetri_3(
'U', -1, a, 1, e, ip, w, 1, info )
416 CALL chkxer(
'CHETRI_3', infot, nout, lerr, ok )
418 CALL chetri_3(
'U', 2, a, 1, e, ip, w, 1, info )
419 CALL chkxer(
'CHETRI_3', infot, nout, lerr, ok )
421 CALL chetri_3(
'U', 0, a, 1, e, ip, w, 0, info )
422 CALL chkxer(
'CHETRI_3', infot, nout, lerr, ok )
424 CALL chetri_3(
'U', 0, a, 1, e, ip, w, -2, info )
425 CALL chkxer(
'CHETRI_3', infot, nout, lerr, ok )
431 CALL chetri_3x(
'/', 0, a, 1, e, ip, w, 1, info )
432 CALL chkxer(
'CHETRI_3X', infot, nout, lerr, ok )
434 CALL chetri_3x(
'U', -1, a, 1, e, ip, w, 1, info )
435 CALL chkxer(
'CHETRI_3X', infot, nout, lerr, ok )
437 CALL chetri_3x(
'U', 2, a, 1, e, ip, w, 1, info )
438 CALL chkxer(
'CHETRI_3X', infot, nout, lerr, ok )
444 CALL chetrs_3(
'/', 0, 0, a, 1, e, ip, b, 1, info )
445 CALL chkxer(
'CHETRS_3', infot, nout, lerr, ok )
447 CALL chetrs_3(
'U', -1, 0, a, 1, e, ip, b, 1, info )
448 CALL chkxer(
'CHETRS_3', infot, nout, lerr, ok )
450 CALL chetrs_3(
'U', 0, -1, a, 1, e, ip, b, 1, info )
451 CALL chkxer(
'CHETRS_3', infot, nout, lerr, ok )
453 CALL chetrs_3(
'U', 2, 1, a, 1, e, ip, b, 2, info )
454 CALL chkxer(
'CHETRS_3', infot, nout, lerr, ok )
456 CALL chetrs_3(
'U', 2, 1, a, 2, e, ip, b, 1, info )
457 CALL chkxer(
'CHETRS_3', infot, nout, lerr, ok )
463 CALL checon_3(
'/', 0, a, 1, e, ip, anrm, rcond, w, info )
464 CALL chkxer(
'CHECON_3', infot, nout, lerr, ok )
466 CALL checon_3(
'U', -1, a, 1, e, ip, anrm, rcond, w, info )
467 CALL chkxer(
'CHECON_3', infot, nout, lerr, ok )
469 CALL checon_3(
'U', 2, a, 1, e, ip, anrm, rcond, w, info )
470 CALL chkxer(
'CHECON_3', infot, nout, lerr, ok )
472 CALL checon_3(
'U', 1, a, 1, e, ip, -1.0e0, rcond, w, info)
473 CALL chkxer(
'CHECON_3', infot, nout, lerr, ok )
475 ELSE IF(
lsamen( 2, c2,
'HA' ) )
THEN
484 CALL chetrf_aa(
'/', 0, a, 1, ip, w, 1, info )
485 CALL chkxer(
'CHETRF_AA', infot, nout, lerr, ok )
487 CALL chetrf_aa(
'U', -1, a, 1, ip, w, 1, info )
488 CALL chkxer(
'CHETRF_AA', infot, nout, lerr, ok )
490 CALL chetrf_aa(
'U', 2, a, 1, ip, w, 4, info )
491 CALL chkxer(
'CHETRF_AA', infot, nout, lerr, ok )
493 CALL chetrf_aa(
'U', 2, a, 2, ip, w, 0, info )
494 CALL chkxer(
'CHETRF_AA', infot, nout, lerr, ok )
496 CALL chetrf_aa(
'U', 2, a, 2, ip, w, -2, info )
497 CALL chkxer(
'CHETRF_AA', infot, nout, lerr, ok )
503 CALL chetrs_aa(
'/', 0, 0, a, 1, ip, b, 1, w, 1, info )
504 CALL chkxer(
'CHETRS_AA', infot, nout, lerr, ok )
506 CALL chetrs_aa(
'U', -1, 0, a, 1, ip, b, 1, w, 1, info )
507 CALL chkxer(
'CHETRS_AA', infot, nout, lerr, ok )
509 CALL chetrs_aa(
'U', 0, -1, a, 1, ip, b, 1, w, 1, info )
510 CALL chkxer(
'CHETRS_AA', infot, nout, lerr, ok )
512 CALL chetrs_aa(
'U', 2, 1, a, 1, ip, b, 2, w, 1, info )
513 CALL chkxer(
'CHETRS_AA', infot, nout, lerr, ok )
515 CALL chetrs_aa(
'U', 2, 1, a, 2, ip, b, 1, w, 1, info )
516 CALL chkxer(
'CHETRS_AA', infot, nout, lerr, ok )
518 CALL chetrs_aa(
'U', 2, 1, a, 2, ip, b, 2, w, 0, info )
519 CALL chkxer(
'CHETRS_AA', infot, nout, lerr, ok )
521 CALL chetrs_aa(
'U', 2, 1, a, 2, ip, b, 2, w, -2, info )
522 CALL chkxer(
'CHETRS_AA', infot, nout, lerr, ok )
524 ELSE IF(
lsamen( 2, c2,
'H2' ) )
THEN
531 srnamt =
'CHETRF_AA_2STAGE'
533 CALL chetrf_aa_2stage(
'/', 0, a, 1, a, 1, ip, ip, w, 1,
535 CALL chkxer(
'CHETRF_AA_2STAGE', infot, nout, lerr, ok )
537 CALL chetrf_aa_2stage(
'U', -1, a, 1, a, 1, ip, ip, w, 1,
539 CALL chkxer(
'CHETRF_AA_2STAGE', infot, nout, lerr, ok )
541 CALL chetrf_aa_2stage(
'U', 2, a, 1, a, 2, ip, ip, w, 1,
543 CALL chkxer(
'CHETRF_AA_2STAGE', infot, nout, lerr, ok )
545 CALL chetrf_aa_2stage(
'U', 2, a, 2, a, 1, ip, ip, w, 1,
547 CALL chkxer(
'CHETRF_AA_2STAGE', infot, nout, lerr, ok )
549 CALL chetrf_aa_2stage(
'U', 2, a, 2, a, 8, ip, ip, w, 0,
551 CALL chkxer(
'CHETRF_AA_2STAGE', infot, nout, lerr, ok )
555 srnamt =
'CHETRS_AA_2STAGE'
559 CALL chkxer(
'CHETRS_AA_2STAGE', infot, nout, lerr, ok )
563 CALL chkxer(
'CHETRS_AA_2STAGE', infot, nout, lerr, ok )
567 CALL chkxer(
'CHETRS_AA_2STAGE', infot, nout, lerr, ok )
571 CALL chkxer(
'CHETRS_AA_2STAGE', infot, nout, lerr, ok )
575 CALL chkxer(
'CHETRS_AA_2STAGE', infot, nout, lerr, ok )
579 CALL chkxer(
'CHETRS_AA_STAGE', infot, nout, lerr, ok )
585 ELSE IF(
lsamen( 2, c2,
'HP' ) )
THEN
591 CALL chptrf(
'/', 0, a, ip, info )
592 CALL chkxer(
'CHPTRF', infot, nout, lerr, ok )
594 CALL chptrf(
'U', -1, a, ip, info )
595 CALL chkxer(
'CHPTRF', infot, nout, lerr, ok )
601 CALL chptri(
'/', 0, a, ip, w, info )
602 CALL chkxer(
'CHPTRI', infot, nout, lerr, ok )
604 CALL chptri(
'U', -1, a, ip, w, info )
605 CALL chkxer(
'CHPTRI', infot, nout, lerr, ok )
611 CALL chptrs(
'/', 0, 0, a, ip, b, 1, info )
612 CALL chkxer(
'CHPTRS', infot, nout, lerr, ok )
614 CALL chptrs(
'U', -1, 0, a, ip, b, 1, info )
615 CALL chkxer(
'CHPTRS', infot, nout, lerr, ok )
617 CALL chptrs(
'U', 0, -1, a, ip, b, 1, info )
618 CALL chkxer(
'CHPTRS', infot, nout, lerr, ok )
620 CALL chptrs(
'U', 2, 1, a, ip, b, 1, info )
621 CALL chkxer(
'CHPTRS', infot, nout, lerr, ok )
627 CALL chprfs(
'/', 0, 0, a, af, ip, b, 1, x, 1, r1, r2, w, r,
629 CALL chkxer(
'CHPRFS', infot, nout, lerr, ok )
631 CALL chprfs(
'U', -1, 0, a, af, ip, b, 1, x, 1, r1, r2, w, r,
633 CALL chkxer(
'CHPRFS', infot, nout, lerr, ok )
635 CALL chprfs(
'U', 0, -1, a, af, ip, b, 1, x, 1, r1, r2, w, r,
637 CALL chkxer(
'CHPRFS', infot, nout, lerr, ok )
639 CALL chprfs(
'U', 2, 1, a, af, ip, b, 1, x, 2, r1, r2, w, r,
641 CALL chkxer(
'CHPRFS', infot, nout, lerr, ok )
643 CALL chprfs(
'U', 2, 1, a, af, ip, b, 2, x, 1, r1, r2, w, r,
645 CALL chkxer(
'CHPRFS', infot, nout, lerr, ok )
651 CALL chpcon(
'/', 0, a, ip, anrm, rcond, w, info )
652 CALL chkxer(
'CHPCON', infot, nout, lerr, ok )
654 CALL chpcon(
'U', -1, a, ip, anrm, rcond, w, info )
655 CALL chkxer(
'CHPCON', infot, nout, lerr, ok )
657 CALL chpcon(
'U', 1, a, ip, -anrm, rcond, w, info )
658 CALL chkxer(
'CHPCON', infot, nout, lerr, ok )
663 CALL alaesm( path, ok, nout )