--- rpl/lapack/lapack/zbbcsd.f 2011/11/21 20:43:07 1.4 +++ rpl/lapack/lapack/zbbcsd.f 2023/08/07 08:39:15 1.17 @@ -2,18 +2,18 @@ * * =========== DOCUMENTATION =========== * -* Online html documentation available at -* http://www.netlib.org/lapack/explore-html/ +* Online html documentation available at +* http://www.netlib.org/lapack/explore-html/ * *> \htmlonly -*> Download ZBBCSD + dependencies -*> -*> [TGZ] -*> -*> [ZIP] -*> +*> Download ZBBCSD + dependencies +*> +*> [TGZ] +*> +*> [ZIP] +*> *> [TXT] -*> \endhtmlonly +*> \endhtmlonly * * Definition: * =========== @@ -22,7 +22,7 @@ * THETA, PHI, U1, LDU1, U2, LDU2, V1T, LDV1T, * V2T, LDV2T, B11D, B11E, B12D, B12E, B21D, B21E, * B22D, B22E, RWORK, LRWORK, INFO ) -* +* * .. Scalar Arguments .. * CHARACTER JOBU1, JOBU2, JOBV1T, JOBV2T, TRANS * INTEGER INFO, LDU1, LDU2, LDV1T, LDV2T, LRWORK, M, P, Q @@ -34,7 +34,7 @@ * COMPLEX*16 U1( LDU1, * ), U2( LDU2, * ), V1T( LDV1T, * ), * $ V2T( LDV2T, * ) * .. -* +* * *> \par Purpose: * ============= @@ -149,7 +149,7 @@ *> \param[in,out] U1 *> \verbatim *> U1 is COMPLEX*16 array, dimension (LDU1,P) -*> On entry, an LDU1-by-P matrix. On exit, U1 is postmultiplied +*> On entry, a P-by-P matrix. On exit, U1 is postmultiplied *> by the left singular vector matrix common to [ B11 ; 0 ] and *> [ B12 0 0 ; 0 -I 0 0 ]. *> \endverbatim @@ -157,13 +157,13 @@ *> \param[in] LDU1 *> \verbatim *> LDU1 is INTEGER -*> The leading dimension of the array U1. +*> The leading dimension of the array U1, LDU1 >= MAX(1,P). *> \endverbatim *> *> \param[in,out] U2 *> \verbatim *> U2 is COMPLEX*16 array, dimension (LDU2,M-P) -*> On entry, an LDU2-by-(M-P) matrix. On exit, U2 is +*> On entry, an (M-P)-by-(M-P) matrix. On exit, U2 is *> postmultiplied by the left singular vector matrix common to *> [ B21 ; 0 ] and [ B22 0 0 ; 0 0 I ]. *> \endverbatim @@ -171,13 +171,13 @@ *> \param[in] LDU2 *> \verbatim *> LDU2 is INTEGER -*> The leading dimension of the array U2. +*> The leading dimension of the array U2, LDU2 >= MAX(1,M-P). *> \endverbatim *> *> \param[in,out] V1T *> \verbatim *> V1T is COMPLEX*16 array, dimension (LDV1T,Q) -*> On entry, a LDV1T-by-Q matrix. On exit, V1T is premultiplied +*> On entry, a Q-by-Q matrix. On exit, V1T is premultiplied *> by the conjugate transpose of the right singular vector *> matrix common to [ B11 ; 0 ] and [ B21 ; 0 ]. *> \endverbatim @@ -185,13 +185,13 @@ *> \param[in] LDV1T *> \verbatim *> LDV1T is INTEGER -*> The leading dimension of the array V1T. +*> The leading dimension of the array V1T, LDV1T >= MAX(1,Q). *> \endverbatim *> *> \param[in,out] V2T *> \verbatim -*> V2T is COMPLEX*16 array, dimenison (LDV2T,M-Q) -*> On entry, a LDV2T-by-(M-Q) matrix. On exit, V2T is +*> V2T is COMPLEX*16 array, dimension (LDV2T,M-Q) +*> On entry, an (M-Q)-by-(M-Q) matrix. On exit, V2T is *> premultiplied by the conjugate transpose of the right *> singular vector matrix common to [ B12 0 0 ; 0 -I 0 ] and *> [ B22 0 0 ; 0 0 I ]. @@ -200,7 +200,7 @@ *> \param[in] LDV2T *> \verbatim *> LDV2T is INTEGER -*> The leading dimension of the array V2T. +*> The leading dimension of the array V2T, LDV2T >= MAX(1,M-Q). *> \endverbatim *> *> \param[out] B11D @@ -240,8 +240,8 @@ *> \param[out] B21D *> \verbatim *> B21D is DOUBLE PRECISION array, dimension (Q) -*> When CBBCSD converges, B21D contains the negative sines of -*> THETA(1), ..., THETA(Q). If CBBCSD fails to converge, then +*> When ZBBCSD converges, B21D contains the negative sines of +*> THETA(1), ..., THETA(Q). If ZBBCSD fails to converge, then *> B21D contains the diagonal of the partially reduced bottom-left *> block. *> \endverbatim @@ -249,7 +249,7 @@ *> \param[out] B21E *> \verbatim *> B21E is DOUBLE PRECISION array, dimension (Q-1) -*> When CBBCSD converges, B21E contains zeros. If CBBCSD fails +*> When ZBBCSD converges, B21E contains zeros. If ZBBCSD fails *> to converge, then B21E contains the subdiagonal of the *> partially reduced bottom-left block. *> \endverbatim @@ -257,8 +257,8 @@ *> \param[out] B22D *> \verbatim *> B22D is DOUBLE PRECISION array, dimension (Q) -*> When CBBCSD converges, B22D contains the negative sines of -*> THETA(1), ..., THETA(Q). If CBBCSD fails to converge, then +*> When ZBBCSD converges, B22D contains the negative sines of +*> THETA(1), ..., THETA(Q). If ZBBCSD fails to converge, then *> B22D contains the diagonal of the partially reduced bottom-right *> block. *> \endverbatim @@ -266,15 +266,15 @@ *> \param[out] B22E *> \verbatim *> B22E is DOUBLE PRECISION array, dimension (Q-1) -*> When CBBCSD converges, B22E contains zeros. If CBBCSD fails +*> When ZBBCSD converges, B22E contains zeros. If ZBBCSD fails *> to converge, then B22E contains the subdiagonal of the *> partially reduced bottom-right block. *> \endverbatim *> *> \param[out] RWORK *> \verbatim -*> RWORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK)) -*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK. +*> RWORK is DOUBLE PRECISION array, dimension (MAX(1,LRWORK)) +*> On exit, if INFO = 0, RWORK(1) returns the optimal LRWORK. *> \endverbatim *> *> \param[in] LRWORK @@ -317,12 +317,10 @@ * Authors: * ======== * -*> \author Univ. of Tennessee -*> \author Univ. of California Berkeley -*> \author Univ. of Colorado Denver -*> \author NAG Ltd. -* -*> \date November 2011 +*> \author Univ. of Tennessee +*> \author Univ. of California Berkeley +*> \author Univ. of Colorado Denver +*> \author NAG Ltd. * *> \ingroup complex16OTHERcomputational * @@ -332,10 +330,9 @@ $ V2T, LDV2T, B11D, B11E, B12D, B12E, B21D, B21E, $ B22D, B22E, RWORK, LRWORK, INFO ) * -* -- LAPACK computational routine (version 3.4.0) -- +* -- LAPACK computational routine -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* November 2011 * * .. Scalar Arguments .. CHARACTER JOBU1, JOBU2, JOBV1T, JOBV2T, TRANS @@ -354,12 +351,13 @@ * .. Parameters .. INTEGER MAXITR PARAMETER ( MAXITR = 6 ) - DOUBLE PRECISION HUNDRED, MEIGHTH, ONE, PIOVER2, TEN, ZERO + DOUBLE PRECISION HUNDRED, MEIGHTH, ONE, TEN, ZERO PARAMETER ( HUNDRED = 100.0D0, MEIGHTH = -0.125D0, - $ ONE = 1.0D0, PIOVER2 = 1.57079632679489662D0, - $ TEN = 10.0D0, ZERO = 0.0D0 ) + $ ONE = 1.0D0, TEN = 10.0D0, ZERO = 0.0D0 ) COMPLEX*16 NEGONECOMPLEX PARAMETER ( NEGONECOMPLEX = (-1.0D0,0.0D0) ) + DOUBLE PRECISION PIOVER2 + PARAMETER ( PIOVER2 = 1.57079632679489661923132169163975144210D0 ) * .. * .. Local Scalars .. LOGICAL COLMAJOR, LQUERY, RESTART11, RESTART12, @@ -476,7 +474,10 @@ * Initial deflation * IMAX = Q - DO WHILE( ( IMAX .GT. 1 ) .AND. ( PHI(IMAX-1) .EQ. ZERO ) ) + DO WHILE( IMAX .GT. 1 ) + IF( PHI(IMAX-1) .NE. ZERO ) THEN + EXIT + END IF IMAX = IMAX - 1 END DO IMIN = IMAX - 1