LAPACK  3.5.0
LAPACK: Linear Algebra PACKage
 All Classes Files Functions Variables Typedefs Macros
cunt01.f File Reference

Go to the source code of this file.

Functions/Subroutines

subroutine cunt01 (ROWCOL, M, N, U, LDU, WORK, LWORK, RWORK, RESID)
 CUNT01 More...
 

Function/Subroutine Documentation

subroutine cunt01 ( character  ROWCOL,
integer  M,
integer  N,
complex, dimension( ldu, * )  U,
integer  LDU,
complex, dimension( * )  WORK,
integer  LWORK,
real, dimension( * )  RWORK,
real  RESID 
)

CUNT01

Purpose:
 CUNT01 checks that the matrix U is unitary by computing the ratio

    RESID = norm( I - U*U' ) / ( n * EPS ), if ROWCOL = 'R',
 or
    RESID = norm( I - U'*U ) / ( m * EPS ), if ROWCOL = 'C'.

 Alternatively, if there isn't sufficient workspace to form
 I - U*U' or I - U'*U, the ratio is computed as

    RESID = abs( I - U*U' ) / ( n * EPS ), if ROWCOL = 'R',
 or
    RESID = abs( I - U'*U ) / ( m * EPS ), if ROWCOL = 'C'.

 where EPS is the machine precision.  ROWCOL is used only if m = n;
 if m > n, ROWCOL is assumed to be 'C', and if m < n, ROWCOL is
 assumed to be 'R'.
Parameters
[in]ROWCOL
          ROWCOL is CHARACTER
          Specifies whether the rows or columns of U should be checked
          for orthogonality.  Used only if M = N.
          = 'R':  Check for orthogonal rows of U
          = 'C':  Check for orthogonal columns of U
[in]M
          M is INTEGER
          The number of rows of the matrix U.
[in]N
          N is INTEGER
          The number of columns of the matrix U.
[in]U
          U is COMPLEX array, dimension (LDU,N)
          The unitary matrix U.  U is checked for orthogonal columns
          if m > n or if m = n and ROWCOL = 'C'.  U is checked for
          orthogonal rows if m < n or if m = n and ROWCOL = 'R'.
[in]LDU
          LDU is INTEGER
          The leading dimension of the array U.  LDU >= max(1,M).
[out]WORK
          WORK is COMPLEX array, dimension (LWORK)
[in]LWORK
          LWORK is INTEGER
          The length of the array WORK.  For best performance, LWORK
          should be at least N*N if ROWCOL = 'C' or M*M if
          ROWCOL = 'R', but the test will be done even if LWORK is 0.
[out]RWORK
          RWORK is REAL array, dimension (min(M,N))
          Used only if LWORK is large enough to use the Level 3 BLAS
          code.
[out]RESID
          RESID is REAL
          RESID = norm( I - U * U' ) / ( n * EPS ), if ROWCOL = 'R', or
          RESID = norm( I - U' * U ) / ( m * EPS ), if ROWCOL = 'C'.
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Date
November 2011

Definition at line 126 of file cunt01.f.

Here is the call graph for this function:

Here is the caller graph for this function: