132 SUBROUTINE zlahilb( N, NRHS, A, LDA, X, LDX, B, LDB, WORK,
140 INTEGER N, NRHS, LDA, LDX, LDB, INFO
142 DOUBLE PRECISION WORK(N)
143 COMPLEX*16 A(LDA,N), X(LDX, NRHS), B(LDB, NRHS)
161 INTEGER NMAX_EXACT, NMAX_APPROX, SIZE_D
162 parameter(nmax_exact = 6, nmax_approx = 11, size_d = 8)
165 COMPLEX*16 D1(8), D2(8), INVD1(8), INVD2(8)
166 DATA d1 /(-1.0d0,0.0d0),(0.0d0,1.0d0),(-1.0d0,-1.0d0),
167 $ (0.0d0,-1.0d0),(1.0d0,0.0d0),(-1.0d0,1.0d0),(1.0d0,1.0d0),
169 DATA d2 /(-1.0d0,0.0d0),(0.0d0,-1.0d0),(-1.0d0,1.0d0),
170 $ (0.0d0,1.0d0),(1.0d0,0.0d0),(-1.0d0,-1.0d0),(1.0d0,-1.0d0),
173 DATA invd1 /(-1.0d0,0.0d0),(0.0d0,-1.0d0),(-0.5d0,0.5d0),
174 $ (0.0d0,1.0d0),(1.0d0,0.0d0),(-0.5d0,-0.5d0),(0.5d0,-0.5d0),
176 DATA invd2 /(-1.0d0,0.0d0),(0.0d0,1.0d0),(-0.5d0,-0.5d0),
177 $ (0.0d0,-1.0d0),(1.0d0,0.0d0),(-0.5d0,0.5d0),(0.5d0,0.5d0),
194 IF (n .LT. 0 .OR. n .GT. nmax_approx)
THEN
196 ELSE IF (nrhs .LT. 0)
THEN
198 ELSE IF (lda .LT. n)
THEN
200 ELSE IF (ldx .LT. n)
THEN
202 ELSE IF (ldb .LT. n)
THEN
205 IF (info .LT. 0)
THEN
206 CALL xerbla(
'ZLAHILB', -info)
209 IF (n .GT. nmax_exact)
THEN
231 IF ( lsamen( 2, c2,
'SY' ) )
THEN
234 a(i, j) = d1(mod(j,size_d)+1) * (dble(m) / (i + j - 1))
235 $ * d1(mod(i,size_d)+1)
241 a(i, j) = d1(mod(j,size_d)+1) * (dble(m) / (i + j - 1))
242 $ * d2(mod(i,size_d)+1)
250 CALL zlaset(
'Full', n, nrhs, (0.0d+0,0.0d+0), tmp, b, ldb)
257 work(j) = ( ( (work(j-1)/(j-1)) * (j-1 - n) ) /(j-1) )
263 IF ( lsamen( 2, c2,
'SY' ) )
THEN
266 x(i, j) = invd1(mod(j,size_d)+1) *
267 $ ((work(i)*work(j)) / (i + j - 1))
268 $ * invd1(mod(i,size_d)+1)
274 x(i, j) = invd2(mod(j,size_d)+1) *
275 $ ((work(i)*work(j)) / (i + j - 1))
276 $ * invd1(mod(i,size_d)+1)
subroutine zlahilb(n, nrhs, a, lda, x, ldx, b, ldb, work, info, path)
ZLAHILB
subroutine xerbla(srname, info)
subroutine zlaset(uplo, m, n, alpha, beta, a, lda)
ZLASET initializes the off-diagonal elements and the diagonal elements of a matrix to given values.
logical function lsamen(n, ca, cb)
LSAMEN