3 * =========== DOCUMENTATION ===========
5 * Online html documentation available at
6 * http://www.netlib.org/lapack/explore-html/
11 * SUBROUTINE DSVDCT( N, S, E, SHIFT, NUM )
13 * .. Scalar Arguments ..
15 * DOUBLE PRECISION SHIFT
17 * .. Array Arguments ..
18 * DOUBLE PRECISION E( * ), S( * )
27 *> DSVDCT counts the number NUM of eigenvalues of a 2*N by 2*N
28 *> tridiagonal matrix T which are less than or equal to SHIFT. T is
29 *> formed by putting zeros on the diagonal and making the off-diagonals
30 *> equal to S(1), E(1), S(2), E(2), ... , E(N-1), S(N). If SHIFT is
31 *> positive, NUM is equal to N plus the number of singular values of a
32 *> bidiagonal matrix B less than or equal to SHIFT. Here B has diagonal
33 *> entries S(1), ..., S(N) and superdiagonal entries E(1), ... E(N-1).
34 *> If SHIFT is negative, NUM is equal to the number of singular values
35 *> of B greater than or equal to -SHIFT.
37 *> See W. Kahan "Accurate Eigenvalues of a Symmetric Tridiagonal
38 *> Matrix", Report CS41, Computer Science Dept., Stanford University,
48 *> The dimension of the bidiagonal matrix B.
53 *> S is DOUBLE PRECISION array, dimension (N)
54 *> The diagonal entries of the bidiagonal matrix B.
59 *> E is DOUBLE PRECISION array of dimension (N-1)
60 *> The superdiagonal entries of the bidiagonal matrix B.
65 *> SHIFT is DOUBLE PRECISION
66 *> The shift, used as described under Purpose.
72 *> The number of eigenvalues of T less than or equal to SHIFT.
78 *> \author Univ. of Tennessee
79 *> \author Univ. of California Berkeley
80 *> \author Univ. of Colorado Denver
83 *> \date November 2011
85 *> \ingroup double_eig
87 * =====================================================================
88 SUBROUTINE DSVDCT( N, S, E, SHIFT, NUM )
90 * -- LAPACK test routine (version 3.4.0) --
91 * -- LAPACK is a software package provided by Univ. of Tennessee, --
92 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
95 * .. Scalar Arguments ..
97 DOUBLE PRECISION SHIFT
99 * .. Array Arguments ..
100 DOUBLE PRECISION E( * ), S( * )
103 * =====================================================================
107 PARAMETER ( ONE = 1.0D0 )
108 DOUBLE PRECISION ZERO
109 PARAMETER ( ZERO = 0.0D0 )
111 * .. Local Scalars ..
113 DOUBLE PRECISION M1, M2, MX, OVFL, SOV, SSHIFT, SSUN, SUN, TMP,
116 * .. External Functions ..
117 DOUBLE PRECISION DLAMCH
120 * .. Intrinsic Functions ..
121 INTRINSIC ABS, MAX, SQRT
123 * .. Executable Statements ..
125 * Get machine constants
127 UNFL = 2*DLAMCH( 'Safe minimum' )
134 MX = MAX( MX, ABS( S( I+1 ) ), ABS( E( I ) ) )
137 IF( MX.EQ.ZERO ) THEN
138 IF( SHIFT.LT.ZERO ) THEN
146 * Compute scale factors as in Kahan's report
164 SSHIFT = ( SHIFT*M1 )*M2
175 TMP = ( S( 1 )*M1 )*M2
176 U = -TMP*( TMP / U ) - SSHIFT
187 TMP = ( E( I )*M1 )*M2
188 U = -TMP*( TMP / U ) - SSHIFT
198 TMP = ( S( I+1 )*M1 )*M2
199 U = -TMP*( TMP / U ) - SSHIFT