LAPACK  3.6.1 LAPACK: Linear Algebra PACKage
 subroutine zlag2c ( integer M, integer N, complex*16, dimension( lda, * ) A, integer LDA, complex, dimension( ldsa, * ) SA, integer LDSA, integer INFO )

ZLAG2C converts a complex double precision matrix to a complex single precision matrix.

Purpose:
``` ZLAG2C converts a COMPLEX*16 matrix, SA, to a COMPLEX matrix, A.

RMAX is the overflow for the SINGLE PRECISION arithmetic
ZLAG2C checks that all the entries of A are between -RMAX and
RMAX. If not the convertion is aborted and a flag is raised.

This is an auxiliary routine so there is no argument checking.```
Parameters
 [in] M ``` M is INTEGER The number of lines of the matrix A. M >= 0.``` [in] N ``` N is INTEGER The number of columns of the matrix A. N >= 0.``` [in] A ``` A is COMPLEX*16 array, dimension (LDA,N) On entry, the M-by-N coefficient matrix A.``` [in] LDA ``` LDA is INTEGER The leading dimension of the array A. LDA >= max(1,M).``` [out] SA ``` SA is COMPLEX array, dimension (LDSA,N) On exit, if INFO=0, the M-by-N coefficient matrix SA; if INFO>0, the content of SA is unspecified.``` [in] LDSA ``` LDSA is INTEGER The leading dimension of the array SA. LDSA >= max(1,M).``` [out] INFO ``` INFO is INTEGER = 0: successful exit. = 1: an entry of the matrix A is greater than the SINGLE PRECISION overflow threshold, in this case, the content of SA in exit is unspecified.```
Date
September 2012

Definition at line 109 of file zlag2c.f.

109 *
110 * -- LAPACK auxiliary routine (version 3.4.2) --
111 * -- LAPACK is a software package provided by Univ. of Tennessee, --
112 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
113 * September 2012
114 *
115 * .. Scalar Arguments ..
116  INTEGER info, lda, ldsa, m, n
117 * ..
118 * .. Array Arguments ..
119  COMPLEX sa( ldsa, * )
120  COMPLEX*16 a( lda, * )
121 * ..
122 *
123 * =====================================================================
124 *
125 * .. Local Scalars ..
126  INTEGER i, j
127  DOUBLE PRECISION rmax
128 * ..
129 * .. Intrinsic Functions ..
130  INTRINSIC dble, dimag
131 * ..
132 * .. External Functions ..
133  REAL slamch
134  EXTERNAL slamch
135 * ..
136 * .. Executable Statements ..
137 *
138  rmax = slamch( 'O' )
139  DO 20 j = 1, n
140  DO 10 i = 1, m
141  IF( ( dble( a( i, j ) ).LT.-rmax ) .OR.
142  \$ ( dble( a( i, j ) ).GT.rmax ) .OR.
143  \$ ( dimag( a( i, j ) ).LT.-rmax ) .OR.
144  \$ ( dimag( a( i, j ) ).GT.rmax ) ) THEN
145  info = 1
146  GO TO 30
147  END IF
148  sa( i, j ) = a( i, j )
149  10 CONTINUE
150  20 CONTINUE
151  info = 0
152  30 CONTINUE
153  RETURN
154 *
155 * End of ZLAG2C
156 *
real function slamch(CMACH)
SLAMCH
Definition: slamch.f:69

Here is the caller graph for this function: