|
| 1 | +--- openblas-v0.2.8/lapack-netlib/SRC/dlasd4.f 2013-08-01 21:23:12.000000000 +0530 |
| 2 | ++++ dlasd4.f.new 2013-08-13 11:54:28.000000000 +0530 |
| 3 | +@@ -1,4 +1,4 @@ |
| 4 | +-*> \brief \b DLASD4 computes the square root of the i-th updated eigenvalue of a positive symmetric rank-one modification to a positive diagonal matrix. Used by dbdsdc. |
| 5 | ++*> \brief \b SLASD4 computes the square root of the i-th updated eigenvalue of a positive symmetric rank-one modification to a positive diagonal matrix. Used by sbdsdc. |
| 6 | + * |
| 7 | + * =========== DOCUMENTATION =========== |
| 8 | + * |
| 9 | +@@ -6,26 +6,26 @@ |
| 10 | + * http://www.netlib.org/lapack/explore-html/ |
| 11 | + * |
| 12 | + *> \htmlonly |
| 13 | +-*> Download DLASD4 + dependencies |
| 14 | +-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlasd4.f"> |
| 15 | ++*> Download SLASD4 + dependencies |
| 16 | ++*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/slasd4.f"> |
| 17 | + *> [TGZ]</a> |
| 18 | +-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlasd4.f"> |
| 19 | ++*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/slasd4.f"> |
| 20 | + *> [ZIP]</a> |
| 21 | +-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlasd4.f"> |
| 22 | ++*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/slasd4.f"> |
| 23 | + *> [TXT]</a> |
| 24 | + *> \endhtmlonly |
| 25 | + * |
| 26 | + * Definition: |
| 27 | + * =========== |
| 28 | + * |
| 29 | +-* SUBROUTINE DLASD4( N, I, D, Z, DELTA, RHO, SIGMA, WORK, INFO ) |
| 30 | ++* SUBROUTINE SLASD4( N, I, D, Z, DELTA, RHO, SIGMA, WORK, INFO ) |
| 31 | + * |
| 32 | + * .. Scalar Arguments .. |
| 33 | + * INTEGER I, INFO, N |
| 34 | +-* DOUBLE PRECISION RHO, SIGMA |
| 35 | ++* REAL RHO, SIGMA |
| 36 | + * .. |
| 37 | + * .. Array Arguments .. |
| 38 | +-* DOUBLE PRECISION D( * ), DELTA( * ), WORK( * ), Z( * ) |
| 39 | ++* REAL D( * ), DELTA( * ), WORK( * ), Z( * ) |
| 40 | + * .. |
| 41 | + * |
| 42 | + * |
| 43 | +@@ -69,20 +69,20 @@ |
| 44 | + *> |
| 45 | + *> \param[in] D |
| 46 | + *> \verbatim |
| 47 | +-*> D is DOUBLE PRECISION array, dimension ( N ) |
| 48 | ++*> D is REAL array, dimension ( N ) |
| 49 | + *> The original eigenvalues. It is assumed that they are in |
| 50 | + *> order, 0 <= D(I) < D(J) for I < J. |
| 51 | + *> \endverbatim |
| 52 | + *> |
| 53 | + *> \param[in] Z |
| 54 | + *> \verbatim |
| 55 | +-*> Z is DOUBLE PRECISION array, dimension ( N ) |
| 56 | ++*> Z is REAL array, dimension ( N ) |
| 57 | + *> The components of the updating vector. |
| 58 | + *> \endverbatim |
| 59 | + *> |
| 60 | + *> \param[out] DELTA |
| 61 | + *> \verbatim |
| 62 | +-*> DELTA is DOUBLE PRECISION array, dimension ( N ) |
| 63 | ++*> DELTA is REAL array, dimension ( N ) |
| 64 | + *> If N .ne. 1, DELTA contains (D(j) - sigma_I) in its j-th |
| 65 | + *> component. If N = 1, then DELTA(1) = 1. The vector DELTA |
| 66 | + *> contains the information necessary to construct the |
| 67 | +@@ -91,19 +91,19 @@ |
| 68 | + *> |
| 69 | + *> \param[in] RHO |
| 70 | + *> \verbatim |
| 71 | +-*> RHO is DOUBLE PRECISION |
| 72 | ++*> RHO is REAL |
| 73 | + *> The scalar in the symmetric updating formula. |
| 74 | + *> \endverbatim |
| 75 | + *> |
| 76 | + *> \param[out] SIGMA |
| 77 | + *> \verbatim |
| 78 | +-*> SIGMA is DOUBLE PRECISION |
| 79 | ++*> SIGMA is REAL |
| 80 | + *> The computed sigma_I, the I-th updated eigenvalue. |
| 81 | + *> \endverbatim |
| 82 | + *> |
| 83 | + *> \param[out] WORK |
| 84 | + *> \verbatim |
| 85 | +-*> WORK is DOUBLE PRECISION array, dimension ( N ) |
| 86 | ++*> WORK is REAL array, dimension ( N ) |
| 87 | + *> If N .ne. 1, WORK contains (D(j) + sigma_I) in its j-th |
| 88 | + *> component. If N = 1, then WORK( 1 ) = 1. |
| 89 | + *> \endverbatim |
| 90 | +@@ -151,7 +151,7 @@ |
| 91 | + *> at Berkeley, USA |
| 92 | + *> |
| 93 | + * ===================================================================== |
| 94 | +- SUBROUTINE DLASD4( N, I, D, Z, DELTA, RHO, SIGMA, WORK, INFO ) |
| 95 | ++ SUBROUTINE SLASD4( N, I, D, Z, DELTA, RHO, SIGMA, WORK, INFO ) |
| 96 | + * |
| 97 | + * -- LAPACK auxiliary routine (version 3.4.2) -- |
| 98 | + * -- LAPACK is a software package provided by Univ. of Tennessee, -- |
| 99 | +@@ -160,10 +160,10 @@ |
| 100 | + * |
| 101 | + * .. Scalar Arguments .. |
| 102 | + INTEGER I, INFO, N |
| 103 | +- DOUBLE PRECISION RHO, SIGMA |
| 104 | ++ REAL RHO, SIGMA |
| 105 | + * .. |
| 106 | + * .. Array Arguments .. |
| 107 | +- DOUBLE PRECISION D( * ), DELTA( * ), WORK( * ), Z( * ) |
| 108 | ++ REAL D( * ), DELTA( * ), WORK( * ), Z( * ) |
| 109 | + * .. |
| 110 | + * |
| 111 | + * ===================================================================== |
| 112 | +@@ -171,28 +171,28 @@ |
| 113 | + * .. Parameters .. |
| 114 | + INTEGER MAXIT |
| 115 | + PARAMETER ( MAXIT = 400 ) |
| 116 | +- DOUBLE PRECISION ZERO, ONE, TWO, THREE, FOUR, EIGHT, TEN |
| 117 | +- PARAMETER ( ZERO = 0.0D+0, ONE = 1.0D+0, TWO = 2.0D+0, |
| 118 | +- $ THREE = 3.0D+0, FOUR = 4.0D+0, EIGHT = 8.0D+0, |
| 119 | +- $ TEN = 10.0D+0 ) |
| 120 | ++ REAL ZERO, ONE, TWO, THREE, FOUR, EIGHT, TEN |
| 121 | ++ PARAMETER ( ZERO = 0.0E+0, ONE = 1.0E+0, TWO = 2.0E+0, |
| 122 | ++ $ THREE = 3.0E+0, FOUR = 4.0E+0, EIGHT = 8.0E+0, |
| 123 | ++ $ TEN = 10.0E+0 ) |
| 124 | + * .. |
| 125 | + * .. Local Scalars .. |
| 126 | + LOGICAL ORGATI, SWTCH, SWTCH3, GEOMAVG |
| 127 | + INTEGER II, IIM1, IIP1, IP1, ITER, J, NITER |
| 128 | +- DOUBLE PRECISION A, B, C, DELSQ, DELSQ2, SQ2, DPHI, DPSI, DTIIM, |
| 129 | ++ REAL A, B, C, DELSQ, DELSQ2, SQ2, DPHI, DPSI, DTIIM, |
| 130 | + $ DTIIP, DTIPSQ, DTISQ, DTNSQ, DTNSQ1, DW, EPS, |
| 131 | + $ ERRETM, ETA, PHI, PREW, PSI, RHOINV, SGLB, |
| 132 | + $ SGUB, TAU, TAU2, TEMP, TEMP1, TEMP2, W |
| 133 | + * .. |
| 134 | + * .. Local Arrays .. |
| 135 | +- DOUBLE PRECISION DD( 3 ), ZZ( 3 ) |
| 136 | ++ REAL DD( 3 ), ZZ( 3 ) |
| 137 | + * .. |
| 138 | + * .. External Subroutines .. |
| 139 | +- EXTERNAL DLAED6, DLASD5 |
| 140 | ++ EXTERNAL SLAED6, SLASD5 |
| 141 | + * .. |
| 142 | + * .. External Functions .. |
| 143 | +- DOUBLE PRECISION DLAMCH |
| 144 | +- EXTERNAL DLAMCH |
| 145 | ++ REAL SLAMCH |
| 146 | ++ EXTERNAL SLAMCH |
| 147 | + * .. |
| 148 | + * .. Intrinsic Functions .. |
| 149 | + INTRINSIC ABS, MAX, MIN, SQRT |
| 150 | +@@ -215,14 +215,15 @@ |
| 151 | + RETURN |
| 152 | + END IF |
| 153 | + IF( N.EQ.2 ) THEN |
| 154 | +- CALL DLASD5( I, D, Z, DELTA, RHO, SIGMA, WORK ) |
| 155 | ++ CALL SLASD5( I, D, Z, DELTA, RHO, SIGMA, WORK ) |
| 156 | + RETURN |
| 157 | + END IF |
| 158 | + * |
| 159 | + * Compute machine epsilon |
| 160 | + * |
| 161 | +- EPS = DLAMCH( 'Epsilon' ) |
| 162 | ++ EPS = SLAMCH( 'Epsilon' ) |
| 163 | + RHOINV = ONE / RHO |
| 164 | ++ TAU2= ZERO |
| 165 | + * |
| 166 | + * The case I = N |
| 167 | + * |
| 168 | +@@ -275,6 +276,7 @@ |
| 169 | + ELSE |
| 170 | + TAU2 = ( A+SQRT( A*A+FOUR*B*C ) ) / ( TWO*C ) |
| 171 | + END IF |
| 172 | ++ TAU = TAU2 / ( D( N )+SQRT( D( N )*D( N )+TAU2 ) ) |
| 173 | + END IF |
| 174 | + * |
| 175 | + * It can be proved that |
| 176 | +@@ -293,6 +295,8 @@ |
| 177 | + ELSE |
| 178 | + TAU2 = ( A+SQRT( A*A+FOUR*B*C ) ) / ( TWO*C ) |
| 179 | + END IF |
| 180 | ++ TAU = TAU2 / ( D( N )+SQRT( D( N )*D( N )+TAU2 ) ) |
| 181 | ++ |
| 182 | + * |
| 183 | + * It can be proved that |
| 184 | + * D(N)^2 < D(N)^2+TAU2 < SIGMA(N)^2 < D(N)^2+RHO/2 |
| 185 | +@@ -301,7 +305,7 @@ |
| 186 | + * |
| 187 | + * The following TAU is to approximate SIGMA_n - D( N ) |
| 188 | + * |
| 189 | +- TAU = TAU2 / ( D( N )+SQRT( D( N )*D( N )+TAU2 ) ) |
| 190 | ++* TAU = TAU2 / ( D( N )+SQRT( D( N )*D( N )+TAU2 ) ) |
| 191 | + * |
| 192 | + SIGMA = D( N ) + TAU |
| 193 | + DO 30 J = 1, N |
| 194 | +@@ -695,11 +699,11 @@ |
| 195 | + DD( 1 ) = DTIIM |
| 196 | + DD( 2 ) = DELTA( II )*WORK( II ) |
| 197 | + DD( 3 ) = DTIIP |
| 198 | +- CALL DLAED6( NITER, ORGATI, C, DD, ZZ, W, ETA, INFO ) |
| 199 | ++ CALL SLAED6( NITER, ORGATI, C, DD, ZZ, W, ETA, INFO ) |
| 200 | + * |
| 201 | + IF( INFO.NE.0 ) THEN |
| 202 | + * |
| 203 | +-* If INFO is not 0, i.e., DLAED6 failed, switch back |
| 204 | ++* If INFO is not 0, i.e., SLAED6 failed, switch back |
| 205 | + * to 2 pole interpolation. |
| 206 | + * |
| 207 | + SWTCH3 = .FALSE. |
| 208 | +@@ -914,11 +918,11 @@ |
| 209 | + DD( 1 ) = DTIIM |
| 210 | + DD( 2 ) = DELTA( II )*WORK( II ) |
| 211 | + DD( 3 ) = DTIIP |
| 212 | +- CALL DLAED6( NITER, ORGATI, C, DD, ZZ, W, ETA, INFO ) |
| 213 | ++ CALL SLAED6( NITER, ORGATI, C, DD, ZZ, W, ETA, INFO ) |
| 214 | + * |
| 215 | + IF( INFO.NE.0 ) THEN |
| 216 | + * |
| 217 | +-* If INFO is not 0, i.e., DLAED6 failed, switch |
| 218 | ++* If INFO is not 0, i.e., SLAED6 failed, switch |
| 219 | + * back to two pole interpolation |
| 220 | + * |
| 221 | + SWTCH3 = .FALSE. |
| 222 | +@@ -1052,6 +1056,6 @@ |
| 223 | + 240 CONTINUE |
| 224 | + RETURN |
| 225 | + * |
| 226 | +-* End of DLASD4 |
| 227 | ++* End of SLASD4 |
| 228 | + * |
| 229 | + END |
0 commit comments