1 SUBROUTINE dlasq1( N, D, E, WORK, INFO )
12 DOUBLE PRECISION D( * ), E( * ), WORK( * )
63 parameter( zero = 0.0d0 )
67 DOUBLE PRECISION EPS, SCALE, SAFMIN, SIGMN, SIGMX
73 DOUBLE PRECISION DLAMCH
77 INTRINSIC abs, max, sqrt
84 CALL xerbla(
'DLASQ1', -info )
86 ELSE IF( n.EQ.0 )
THEN
88 ELSE IF( n.EQ.1 )
THEN
89 d( 1 ) = abs( d( 1 ) )
91 ELSE IF( n.EQ.2 )
THEN
92 CALL dlas2( d( 1 ), e( 1 ), d( 2 ), sigmn, sigmx )
102 d( i ) = abs( d( i ) )
103 sigmx = max( sigmx, abs( e( i ) ) )
105 d( n ) = abs( d( n ) )
109 IF( sigmx.EQ.zero )
THEN
110 CALL dlasrt(
'D', n, d, iinfo )
115 sigmx = max( sigmx, d( i ) )
121 eps = dlamch(
'Precision' )
122 safmin = dlamch(
'Safe minimum' )
123 scale = sqrt( eps / safmin )
124 CALL dcopy( n, d, 1, work( 1 ), 2 )
125 CALL dcopy( n-1, e, 1, work( 2 ), 2 )
126 CALL dlascl(
'G', 0, 0, sigmx, scale, 2*n-1, 1, work, 2*n-1,
132 work( i ) = work( i )**2
136 CALL dlasq2( n, work, info )
140 d( i ) = sqrt( work( i ) )
142 CALL dlascl(
'G', 0, 0, scale, sigmx, n, 1, d, n, iinfo )
subroutine dcopy(n, dx, incx, dy, incy)
subroutine dlas2(F, G, H, SSMIN, SSMAX)
subroutine dlascl(TYPE, KL, KU, CFROM, CTO, M, N, A, LDA, INFO)
subroutine dlasq1(N, D, E, WORK, INFO)
subroutine dlasq2(N, Z, INFO)
subroutine dlasrt(ID, N, D, INFO)
subroutine xerbla(SRNAME, INFO)