330 SUBROUTINE sbbcsd( JOBU1, JOBU2, JOBV1T, JOBV2T, TRANS, M, P, Q,
331 $ theta, phi, u1, ldu1, u2, ldu2, v1t, ldv1t,
332 $ v2t, ldv2t, b11d, b11e, b12d, b12e, b21d, b21e,
333 $ b22d, b22e, work, lwork, info )
341 CHARACTER jobu1, jobu2, jobv1t, jobv2t, trans
342 INTEGER info, ldu1, ldu2, ldv1t, ldv2t, lwork, m, p, q
345 REAL b11d( * ), b11e( * ), b12d( * ), b12e( * ),
346 $ b21d( * ), b21e( * ), b22d( * ), b22e( * ),
347 $ phi( * ), theta( * ), work( * )
348 REAL u1( ldu1, * ), u2( ldu2, * ), v1t( ldv1t, * ),
356 parameter( maxitr = 6 )
357 REAL hundred, meighth, one, piover2, ten, zero
358 parameter( hundred = 100.0e0, meighth = -0.125e0,
359 $ one = 1.0e0, piover2 = 1.57079632679489662e0,
360 $ ten = 10.0e0, zero = 0.0e0 )
362 parameter( negonecomplex = -1.0e0 )
365 LOGICAL colmajor, lquery, restart11, restart12,
366 $ restart21, restart22, wantu1, wantu2, wantv1t,
368 INTEGER i, imin, imax, iter, iu1cs, iu1sn, iu2cs,
369 $ iu2sn, iv1tcs, iv1tsn, iv2tcs, iv2tsn, j,
370 $ lworkmin, lworkopt, maxit, mini
371 REAL b11bulge, b12bulge, b21bulge, b22bulge, dummy,
372 $ eps, mu, nu, r, sigma11, sigma21,
373 $ temp, thetamax, thetamin, thresh, tol, tolmul,
374 $ unfl, x1, x2, y1, y2
386 INTRINSIC abs, atan2, cos, max, min, sin, sqrt
393 lquery = lwork .EQ. -1
394 wantu1 =
lsame( jobu1,
'Y' )
395 wantu2 =
lsame( jobu2,
'Y' )
396 wantv1t =
lsame( jobv1t,
'Y' )
397 wantv2t =
lsame( jobv2t,
'Y' )
398 colmajor = .NOT.
lsame( trans,
'T' )
402 ELSE IF( p .LT. 0 .OR. p .GT. m )
THEN
404 ELSE IF( q .LT. 0 .OR. q .GT. m )
THEN
406 ELSE IF( q .GT. p .OR. q .GT. m-p .OR. q .GT. m-q )
THEN
408 ELSE IF( wantu1 .AND. ldu1 .LT. p )
THEN
410 ELSE IF( wantu2 .AND. ldu2 .LT. m-p )
THEN
412 ELSE IF( wantv1t .AND. ldv1t .LT. q )
THEN
414 ELSE IF( wantv2t .AND. ldv2t .LT. m-q )
THEN
420 IF( info .EQ. 0 .AND. q .EQ. 0 )
THEN
428 IF( info .EQ. 0 )
THEN
437 lworkopt = iv2tsn + q - 1
440 IF( lwork .LT. lworkmin .AND. .NOT. lquery )
THEN
445 IF( info .NE. 0 )
THEN
446 CALL
xerbla(
'SBBCSD', -info )
448 ELSE IF( lquery )
THEN
455 unfl =
slamch(
'Safe minimum' )
456 tolmul = max( ten, min( hundred, eps**meighth ) )
458 thresh = max( tol, maxitr*q*q*unfl )
463 IF( theta(i) .LT. thresh )
THEN
465 ELSE IF( theta(i) .GT. piover2-thresh )
THEN
470 IF( phi(i) .LT. thresh )
THEN
472 ELSE IF( phi(i) .GT. piover2-thresh )
THEN
480 DO WHILE( ( imax .GT. 1 ) .AND. ( phi(imax-1) .EQ. zero ) )
484 IF ( imin .GT. 1 )
THEN
485 DO WHILE( phi(imin-1) .NE. zero )
487 IF ( imin .LE. 1 ) exit
498 DO WHILE( imax .GT. 1 )
502 b11d(imin) = cos( theta(imin) )
503 b21d(imin) = -sin( theta(imin) )
504 DO i = imin, imax - 1
505 b11e(i) = -sin( theta(i) ) * sin( phi(i) )
506 b11d(i+1) = cos( theta(i+1) ) * cos( phi(i) )
507 b12d(i) = sin( theta(i) ) * cos( phi(i) )
508 b12e(i) = cos( theta(i+1) ) * sin( phi(i) )
509 b21e(i) = -cos( theta(i) ) * sin( phi(i) )
510 b21d(i+1) = -sin( theta(i+1) ) * cos( phi(i) )
511 b22d(i) = cos( theta(i) ) * cos( phi(i) )
512 b22e(i) = -sin( theta(i+1) ) * sin( phi(i) )
514 b12d(imax) = sin( theta(imax) )
515 b22d(imax) = cos( theta(imax) )
519 IF( iter .GT. maxit )
THEN
522 IF( phi(i) .NE. zero )
528 iter = iter + imax - imin
532 thetamax = theta(imin)
533 thetamin = theta(imin)
535 IF( theta(i) > thetamax )
536 $ thetamax = theta(i)
537 IF( theta(i) < thetamin )
538 $ thetamin = theta(i)
541 IF( thetamax .GT. piover2 - thresh )
THEN
549 ELSE IF( thetamin .LT. thresh )
THEN
561 CALL
slas2( b11d(imax-1), b11e(imax-1), b11d(imax), sigma11,
563 CALL
slas2( b21d(imax-1), b21e(imax-1), b21d(imax), sigma21,
566 IF( sigma11 .LE. sigma21 )
THEN
568 nu = sqrt( one - mu**2 )
569 IF( mu .LT. thresh )
THEN
575 mu = sqrt( 1.0 - nu**2 )
576 IF( nu .LT. thresh )
THEN
585 IF( mu .LE. nu )
THEN
586 CALL
slartgs( b11d(imin), b11e(imin), mu,
587 $ work(iv1tcs+imin-1), work(iv1tsn+imin-1) )
589 CALL
slartgs( b21d(imin), b21e(imin), nu,
590 $ work(iv1tcs+imin-1), work(iv1tsn+imin-1) )
593 temp = work(iv1tcs+imin-1)*b11d(imin) +
594 $ work(iv1tsn+imin-1)*b11e(imin)
595 b11e(imin) = work(iv1tcs+imin-1)*b11e(imin) -
596 $ work(iv1tsn+imin-1)*b11d(imin)
598 b11bulge = work(iv1tsn+imin-1)*b11d(imin+1)
599 b11d(imin+1) = work(iv1tcs+imin-1)*b11d(imin+1)
600 temp = work(iv1tcs+imin-1)*b21d(imin) +
601 $ work(iv1tsn+imin-1)*b21e(imin)
602 b21e(imin) = work(iv1tcs+imin-1)*b21e(imin) -
603 $ work(iv1tsn+imin-1)*b21d(imin)
605 b21bulge = work(iv1tsn+imin-1)*b21d(imin+1)
606 b21d(imin+1) = work(iv1tcs+imin-1)*b21d(imin+1)
610 theta( imin ) = atan2( sqrt( b21d(imin)**2+b21bulge**2 ),
611 $ sqrt( b11d(imin)**2+b11bulge**2 ) )
615 IF( b11d(imin)**2+b11bulge**2 .GT. thresh**2 )
THEN
616 CALL
slartgp( b11bulge, b11d(imin), work(iu1sn+imin-1),
617 $ work(iu1cs+imin-1), r )
618 ELSE IF( mu .LE. nu )
THEN
619 CALL
slartgs( b11e( imin ), b11d( imin + 1 ), mu,
620 $ work(iu1cs+imin-1), work(iu1sn+imin-1) )
622 CALL
slartgs( b12d( imin ), b12e( imin ), nu,
623 $ work(iu1cs+imin-1), work(iu1sn+imin-1) )
625 IF( b21d(imin)**2+b21bulge**2 .GT. thresh**2 )
THEN
626 CALL
slartgp( b21bulge, b21d(imin), work(iu2sn+imin-1),
627 $ work(iu2cs+imin-1), r )
628 ELSE IF( nu .LT. mu )
THEN
629 CALL
slartgs( b21e( imin ), b21d( imin + 1 ), nu,
630 $ work(iu2cs+imin-1), work(iu2sn+imin-1) )
632 CALL
slartgs( b22d(imin), b22e(imin), mu,
633 $ work(iu2cs+imin-1), work(iu2sn+imin-1) )
635 work(iu2cs+imin-1) = -work(iu2cs+imin-1)
636 work(iu2sn+imin-1) = -work(iu2sn+imin-1)
638 temp = work(iu1cs+imin-1)*b11e(imin) +
639 $ work(iu1sn+imin-1)*b11d(imin+1)
640 b11d(imin+1) = work(iu1cs+imin-1)*b11d(imin+1) -
641 $ work(iu1sn+imin-1)*b11e(imin)
643 IF( imax .GT. imin+1 )
THEN
644 b11bulge = work(iu1sn+imin-1)*b11e(imin+1)
645 b11e(imin+1) = work(iu1cs+imin-1)*b11e(imin+1)
647 temp = work(iu1cs+imin-1)*b12d(imin) +
648 $ work(iu1sn+imin-1)*b12e(imin)
649 b12e(imin) = work(iu1cs+imin-1)*b12e(imin) -
650 $ work(iu1sn+imin-1)*b12d(imin)
652 b12bulge = work(iu1sn+imin-1)*b12d(imin+1)
653 b12d(imin+1) = work(iu1cs+imin-1)*b12d(imin+1)
654 temp = work(iu2cs+imin-1)*b21e(imin) +
655 $ work(iu2sn+imin-1)*b21d(imin+1)
656 b21d(imin+1) = work(iu2cs+imin-1)*b21d(imin+1) -
657 $ work(iu2sn+imin-1)*b21e(imin)
659 IF( imax .GT. imin+1 )
THEN
660 b21bulge = work(iu2sn+imin-1)*b21e(imin+1)
661 b21e(imin+1) = work(iu2cs+imin-1)*b21e(imin+1)
663 temp = work(iu2cs+imin-1)*b22d(imin) +
664 $ work(iu2sn+imin-1)*b22e(imin)
665 b22e(imin) = work(iu2cs+imin-1)*b22e(imin) -
666 $ work(iu2sn+imin-1)*b22d(imin)
668 b22bulge = work(iu2sn+imin-1)*b22d(imin+1)
669 b22d(imin+1) = work(iu2cs+imin-1)*b22d(imin+1)
675 DO i = imin+1, imax-1
679 x1 = sin(theta(i-1))*b11e(i-1) + cos(theta(i-1))*b21e(i-1)
680 x2 = sin(theta(i-1))*b11bulge + cos(theta(i-1))*b21bulge
681 y1 = sin(theta(i-1))*b12d(i-1) + cos(theta(i-1))*b22d(i-1)
682 y2 = sin(theta(i-1))*b12bulge + cos(theta(i-1))*b22bulge
684 phi(i-1) = atan2( sqrt(x1**2+x2**2), sqrt(y1**2+y2**2) )
689 restart11 = b11e(i-1)**2 + b11bulge**2 .LE. thresh**2
690 restart21 = b21e(i-1)**2 + b21bulge**2 .LE. thresh**2
691 restart12 = b12d(i-1)**2 + b12bulge**2 .LE. thresh**2
692 restart22 = b22d(i-1)**2 + b22bulge**2 .LE. thresh**2
698 IF( .NOT. restart11 .AND. .NOT. restart21 )
THEN
699 CALL
slartgp( x2, x1, work(iv1tsn+i-1), work(iv1tcs+i-1),
701 ELSE IF( .NOT. restart11 .AND. restart21 )
THEN
702 CALL
slartgp( b11bulge, b11e(i-1), work(iv1tsn+i-1),
703 $ work(iv1tcs+i-1), r )
704 ELSE IF( restart11 .AND. .NOT. restart21 )
THEN
705 CALL
slartgp( b21bulge, b21e(i-1), work(iv1tsn+i-1),
706 $ work(iv1tcs+i-1), r )
707 ELSE IF( mu .LE. nu )
THEN
708 CALL
slartgs( b11d(i), b11e(i), mu, work(iv1tcs+i-1),
711 CALL
slartgs( b21d(i), b21e(i), nu, work(iv1tcs+i-1),
714 work(iv1tcs+i-1) = -work(iv1tcs+i-1)
715 work(iv1tsn+i-1) = -work(iv1tsn+i-1)
716 IF( .NOT. restart12 .AND. .NOT. restart22 )
THEN
717 CALL
slartgp( y2, y1, work(iv2tsn+i-1-1),
718 $ work(iv2tcs+i-1-1), r )
719 ELSE IF( .NOT. restart12 .AND. restart22 )
THEN
720 CALL
slartgp( b12bulge, b12d(i-1), work(iv2tsn+i-1-1),
721 $ work(iv2tcs+i-1-1), r )
722 ELSE IF( restart12 .AND. .NOT. restart22 )
THEN
723 CALL
slartgp( b22bulge, b22d(i-1), work(iv2tsn+i-1-1),
724 $ work(iv2tcs+i-1-1), r )
725 ELSE IF( nu .LT. mu )
THEN
726 CALL
slartgs( b12e(i-1), b12d(i), nu, work(iv2tcs+i-1-1),
727 $ work(iv2tsn+i-1-1) )
729 CALL
slartgs( b22e(i-1), b22d(i), mu, work(iv2tcs+i-1-1),
730 $ work(iv2tsn+i-1-1) )
733 temp = work(iv1tcs+i-1)*b11d(i) + work(iv1tsn+i-1)*b11e(i)
734 b11e(i) = work(iv1tcs+i-1)*b11e(i) -
735 $ work(iv1tsn+i-1)*b11d(i)
737 b11bulge = work(iv1tsn+i-1)*b11d(i+1)
738 b11d(i+1) = work(iv1tcs+i-1)*b11d(i+1)
739 temp = work(iv1tcs+i-1)*b21d(i) + work(iv1tsn+i-1)*b21e(i)
740 b21e(i) = work(iv1tcs+i-1)*b21e(i) -
741 $ work(iv1tsn+i-1)*b21d(i)
743 b21bulge = work(iv1tsn+i-1)*b21d(i+1)
744 b21d(i+1) = work(iv1tcs+i-1)*b21d(i+1)
745 temp = work(iv2tcs+i-1-1)*b12e(i-1) +
746 $ work(iv2tsn+i-1-1)*b12d(i)
747 b12d(i) = work(iv2tcs+i-1-1)*b12d(i) -
748 $ work(iv2tsn+i-1-1)*b12e(i-1)
750 b12bulge = work(iv2tsn+i-1-1)*b12e(i)
751 b12e(i) = work(iv2tcs+i-1-1)*b12e(i)
752 temp = work(iv2tcs+i-1-1)*b22e(i-1) +
753 $ work(iv2tsn+i-1-1)*b22d(i)
754 b22d(i) = work(iv2tcs+i-1-1)*b22d(i) -
755 $ work(iv2tsn+i-1-1)*b22e(i-1)
757 b22bulge = work(iv2tsn+i-1-1)*b22e(i)
758 b22e(i) = work(iv2tcs+i-1-1)*b22e(i)
762 x1 = cos(phi(i-1))*b11d(i) + sin(phi(i-1))*b12e(i-1)
763 x2 = cos(phi(i-1))*b11bulge + sin(phi(i-1))*b12bulge
764 y1 = cos(phi(i-1))*b21d(i) + sin(phi(i-1))*b22e(i-1)
765 y2 = cos(phi(i-1))*b21bulge + sin(phi(i-1))*b22bulge
767 theta(i) = atan2( sqrt(y1**2+y2**2), sqrt(x1**2+x2**2) )
772 restart11 = b11d(i)**2 + b11bulge**2 .LE. thresh**2
773 restart12 = b12e(i-1)**2 + b12bulge**2 .LE. thresh**2
774 restart21 = b21d(i)**2 + b21bulge**2 .LE. thresh**2
775 restart22 = b22e(i-1)**2 + b22bulge**2 .LE. thresh**2
781 IF( .NOT. restart11 .AND. .NOT. restart12 )
THEN
782 CALL
slartgp( x2, x1, work(iu1sn+i-1), work(iu1cs+i-1),
784 ELSE IF( .NOT. restart11 .AND. restart12 )
THEN
785 CALL
slartgp( b11bulge, b11d(i), work(iu1sn+i-1),
786 $ work(iu1cs+i-1), r )
787 ELSE IF( restart11 .AND. .NOT. restart12 )
THEN
788 CALL
slartgp( b12bulge, b12e(i-1), work(iu1sn+i-1),
789 $ work(iu1cs+i-1), r )
790 ELSE IF( mu .LE. nu )
THEN
791 CALL
slartgs( b11e(i), b11d(i+1), mu, work(iu1cs+i-1),
794 CALL
slartgs( b12d(i), b12e(i), nu, work(iu1cs+i-1),
797 IF( .NOT. restart21 .AND. .NOT. restart22 )
THEN
798 CALL
slartgp( y2, y1, work(iu2sn+i-1), work(iu2cs+i-1),
800 ELSE IF( .NOT. restart21 .AND. restart22 )
THEN
801 CALL
slartgp( b21bulge, b21d(i), work(iu2sn+i-1),
802 $ work(iu2cs+i-1), r )
803 ELSE IF( restart21 .AND. .NOT. restart22 )
THEN
804 CALL
slartgp( b22bulge, b22e(i-1), work(iu2sn+i-1),
805 $ work(iu2cs+i-1), r )
806 ELSE IF( nu .LT. mu )
THEN
807 CALL
slartgs( b21e(i), b21e(i+1), nu, work(iu2cs+i-1),
810 CALL
slartgs( b22d(i), b22e(i), mu, work(iu2cs+i-1),
813 work(iu2cs+i-1) = -work(iu2cs+i-1)
814 work(iu2sn+i-1) = -work(iu2sn+i-1)
816 temp = work(iu1cs+i-1)*b11e(i) + work(iu1sn+i-1)*b11d(i+1)
817 b11d(i+1) = work(iu1cs+i-1)*b11d(i+1) -
818 $ work(iu1sn+i-1)*b11e(i)
820 IF( i .LT. imax - 1 )
THEN
821 b11bulge = work(iu1sn+i-1)*b11e(i+1)
822 b11e(i+1) = work(iu1cs+i-1)*b11e(i+1)
824 temp = work(iu2cs+i-1)*b21e(i) + work(iu2sn+i-1)*b21d(i+1)
825 b21d(i+1) = work(iu2cs+i-1)*b21d(i+1) -
826 $ work(iu2sn+i-1)*b21e(i)
828 IF( i .LT. imax - 1 )
THEN
829 b21bulge = work(iu2sn+i-1)*b21e(i+1)
830 b21e(i+1) = work(iu2cs+i-1)*b21e(i+1)
832 temp = work(iu1cs+i-1)*b12d(i) + work(iu1sn+i-1)*b12e(i)
833 b12e(i) = work(iu1cs+i-1)*b12e(i) - work(iu1sn+i-1)*b12d(i)
835 b12bulge = work(iu1sn+i-1)*b12d(i+1)
836 b12d(i+1) = work(iu1cs+i-1)*b12d(i+1)
837 temp = work(iu2cs+i-1)*b22d(i) + work(iu2sn+i-1)*b22e(i)
838 b22e(i) = work(iu2cs+i-1)*b22e(i) - work(iu2sn+i-1)*b22d(i)
840 b22bulge = work(iu2sn+i-1)*b22d(i+1)
841 b22d(i+1) = work(iu2cs+i-1)*b22d(i+1)
847 x1 = sin(theta(imax-1))*b11e(imax-1) +
848 $ cos(theta(imax-1))*b21e(imax-1)
849 y1 = sin(theta(imax-1))*b12d(imax-1) +
850 $ cos(theta(imax-1))*b22d(imax-1)
851 y2 = sin(theta(imax-1))*b12bulge + cos(theta(imax-1))*b22bulge
853 phi(imax-1) = atan2( abs(x1), sqrt(y1**2+y2**2) )
857 restart12 = b12d(imax-1)**2 + b12bulge**2 .LE. thresh**2
858 restart22 = b22d(imax-1)**2 + b22bulge**2 .LE. thresh**2
860 IF( .NOT. restart12 .AND. .NOT. restart22 )
THEN
861 CALL
slartgp( y2, y1, work(iv2tsn+imax-1-1),
862 $ work(iv2tcs+imax-1-1), r )
863 ELSE IF( .NOT. restart12 .AND. restart22 )
THEN
864 CALL
slartgp( b12bulge, b12d(imax-1), work(iv2tsn+imax-1-1),
865 $ work(iv2tcs+imax-1-1), r )
866 ELSE IF( restart12 .AND. .NOT. restart22 )
THEN
867 CALL
slartgp( b22bulge, b22d(imax-1), work(iv2tsn+imax-1-1),
868 $ work(iv2tcs+imax-1-1), r )
869 ELSE IF( nu .LT. mu )
THEN
870 CALL
slartgs( b12e(imax-1), b12d(imax), nu,
871 $ work(iv2tcs+imax-1-1), work(iv2tsn+imax-1-1) )
873 CALL
slartgs( b22e(imax-1), b22d(imax), mu,
874 $ work(iv2tcs+imax-1-1), work(iv2tsn+imax-1-1) )
877 temp = work(iv2tcs+imax-1-1)*b12e(imax-1) +
878 $ work(iv2tsn+imax-1-1)*b12d(imax)
879 b12d(imax) = work(iv2tcs+imax-1-1)*b12d(imax) -
880 $ work(iv2tsn+imax-1-1)*b12e(imax-1)
882 temp = work(iv2tcs+imax-1-1)*b22e(imax-1) +
883 $ work(iv2tsn+imax-1-1)*b22d(imax)
884 b22d(imax) = work(iv2tcs+imax-1-1)*b22d(imax) -
885 $ work(iv2tsn+imax-1-1)*b22e(imax-1)
892 CALL
slasr(
'R',
'V',
'F', p, imax-imin+1,
893 $ work(iu1cs+imin-1), work(iu1sn+imin-1),
896 CALL
slasr(
'L',
'V',
'F', imax-imin+1, p,
897 $ work(iu1cs+imin-1), work(iu1sn+imin-1),
903 CALL
slasr(
'R',
'V',
'F', m-p, imax-imin+1,
904 $ work(iu2cs+imin-1), work(iu2sn+imin-1),
907 CALL
slasr(
'L',
'V',
'F', imax-imin+1, m-p,
908 $ work(iu2cs+imin-1), work(iu2sn+imin-1),
914 CALL
slasr(
'L',
'V',
'F', imax-imin+1, q,
915 $ work(iv1tcs+imin-1), work(iv1tsn+imin-1),
916 $ v1t(imin,1), ldv1t )
918 CALL
slasr(
'R',
'V',
'F', q, imax-imin+1,
919 $ work(iv1tcs+imin-1), work(iv1tsn+imin-1),
920 $ v1t(1,imin), ldv1t )
925 CALL
slasr(
'L',
'V',
'F', imax-imin+1, m-q,
926 $ work(iv2tcs+imin-1), work(iv2tsn+imin-1),
927 $ v2t(imin,1), ldv2t )
929 CALL
slasr(
'R',
'V',
'F', m-q, imax-imin+1,
930 $ work(iv2tcs+imin-1), work(iv2tsn+imin-1),
931 $ v2t(1,imin), ldv2t )
937 IF( b11e(imax-1)+b21e(imax-1) .GT. 0 )
THEN
938 b11d(imax) = -b11d(imax)
939 b21d(imax) = -b21d(imax)
942 CALL
sscal( q, negonecomplex, v1t(imax,1), ldv1t )
944 CALL
sscal( q, negonecomplex, v1t(1,imax), 1 )
951 x1 = cos(phi(imax-1))*b11d(imax) +
952 $ sin(phi(imax-1))*b12e(imax-1)
953 y1 = cos(phi(imax-1))*b21d(imax) +
954 $ sin(phi(imax-1))*b22e(imax-1)
956 theta(imax) = atan2( abs(y1), abs(x1) )
961 IF( b11d(imax)+b12e(imax-1) .LT. 0 )
THEN
962 b12d(imax) = -b12d(imax)
965 CALL
sscal( p, negonecomplex, u1(1,imax), 1 )
967 CALL
sscal( p, negonecomplex, u1(imax,1), ldu1 )
971 IF( b21d(imax)+b22e(imax-1) .GT. 0 )
THEN
972 b22d(imax) = -b22d(imax)
975 CALL
sscal( m-p, negonecomplex, u2(1,imax), 1 )
977 CALL
sscal( m-p, negonecomplex, u2(imax,1), ldu2 )
984 IF( b12d(imax)+b22d(imax) .LT. 0 )
THEN
987 CALL
sscal( m-q, negonecomplex, v2t(imax,1), ldv2t )
989 CALL
sscal( m-q, negonecomplex, v2t(1,imax), 1 )
997 IF( theta(i) .LT. thresh )
THEN
999 ELSE IF( theta(i) .GT. piover2-thresh )
THEN
1004 IF( phi(i) .LT. thresh )
THEN
1006 ELSE IF( phi(i) .GT. piover2-thresh )
THEN
1013 IF (imax .GT. 1)
THEN
1014 DO WHILE( phi(imax-1) .EQ. zero )
1016 IF (imax .LE. 1) exit
1019 IF( imin .GT. imax - 1 )
1021 IF (imin .GT. 1)
THEN
1022 DO WHILE (phi(imin-1) .NE. zero)
1024 IF (imin .LE. 1) exit
1039 IF( theta(j) .LT. thetamin )
THEN
1045 IF( mini .NE. i )
THEN
1046 theta(mini) = theta(i)
1050 $ CALL
sswap( p, u1(1,i), 1, u1(1,mini), 1 )
1052 $ CALL
sswap( m-p, u2(1,i), 1, u2(1,mini), 1 )
1054 $ CALL
sswap( q, v1t(i,1), ldv1t, v1t(mini,1), ldv1t )
1056 $ CALL
sswap( m-q, v2t(i,1), ldv2t, v2t(mini,1),
1060 $ CALL
sswap( p, u1(i,1), ldu1, u1(mini,1), ldu1 )
1062 $ CALL
sswap( m-p, u2(i,1), ldu2, u2(mini,1), ldu2 )
1064 $ CALL
sswap( q, v1t(1,i), 1, v1t(1,mini), 1 )
1066 $ CALL
sswap( m-q, v2t(1,i), 1, v2t(1,mini), 1 )