![]() |
LAPACK
3.4.1
LAPACK: Linear Algebra PACKage
|
00001 *> \brief \b ZLAG2C 00002 * 00003 * =========== DOCUMENTATION =========== 00004 * 00005 * Online html documentation available at 00006 * http://www.netlib.org/lapack/explore-html/ 00007 * 00008 *> \htmlonly 00009 *> Download ZLAG2C + dependencies 00010 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlag2c.f"> 00011 *> [TGZ]</a> 00012 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlag2c.f"> 00013 *> [ZIP]</a> 00014 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlag2c.f"> 00015 *> [TXT]</a> 00016 *> \endhtmlonly 00017 * 00018 * Definition: 00019 * =========== 00020 * 00021 * SUBROUTINE ZLAG2C( M, N, A, LDA, SA, LDSA, INFO ) 00022 * 00023 * .. Scalar Arguments .. 00024 * INTEGER INFO, LDA, LDSA, M, N 00025 * .. 00026 * .. Array Arguments .. 00027 * COMPLEX SA( LDSA, * ) 00028 * COMPLEX*16 A( LDA, * ) 00029 * .. 00030 * 00031 * 00032 *> \par Purpose: 00033 * ============= 00034 *> 00035 *> \verbatim 00036 *> 00037 *> ZLAG2C converts a COMPLEX*16 matrix, SA, to a COMPLEX matrix, A. 00038 *> 00039 *> RMAX is the overflow for the SINGLE PRECISION arithmetic 00040 *> ZLAG2C checks that all the entries of A are between -RMAX and 00041 *> RMAX. If not the convertion is aborted and a flag is raised. 00042 *> 00043 *> This is an auxiliary routine so there is no argument checking. 00044 *> \endverbatim 00045 * 00046 * Arguments: 00047 * ========== 00048 * 00049 *> \param[in] M 00050 *> \verbatim 00051 *> M is INTEGER 00052 *> The number of lines of the matrix A. M >= 0. 00053 *> \endverbatim 00054 *> 00055 *> \param[in] N 00056 *> \verbatim 00057 *> N is INTEGER 00058 *> The number of columns of the matrix A. N >= 0. 00059 *> \endverbatim 00060 *> 00061 *> \param[in] A 00062 *> \verbatim 00063 *> A is COMPLEX*16 array, dimension (LDA,N) 00064 *> On entry, the M-by-N coefficient matrix A. 00065 *> \endverbatim 00066 *> 00067 *> \param[in] LDA 00068 *> \verbatim 00069 *> LDA is INTEGER 00070 *> The leading dimension of the array A. LDA >= max(1,M). 00071 *> \endverbatim 00072 *> 00073 *> \param[out] SA 00074 *> \verbatim 00075 *> SA is COMPLEX array, dimension (LDSA,N) 00076 *> On exit, if INFO=0, the M-by-N coefficient matrix SA; if 00077 *> INFO>0, the content of SA is unspecified. 00078 *> \endverbatim 00079 *> 00080 *> \param[in] LDSA 00081 *> \verbatim 00082 *> LDSA is INTEGER 00083 *> The leading dimension of the array SA. LDSA >= max(1,M). 00084 *> \endverbatim 00085 *> 00086 *> \param[out] INFO 00087 *> \verbatim 00088 *> INFO is INTEGER 00089 *> = 0: successful exit. 00090 *> = 1: an entry of the matrix A is greater than the SINGLE 00091 *> PRECISION overflow threshold, in this case, the content 00092 *> of SA in exit is unspecified. 00093 *> \endverbatim 00094 * 00095 * Authors: 00096 * ======== 00097 * 00098 *> \author Univ. of Tennessee 00099 *> \author Univ. of California Berkeley 00100 *> \author Univ. of Colorado Denver 00101 *> \author NAG Ltd. 00102 * 00103 *> \date November 2011 00104 * 00105 *> \ingroup complex16OTHERauxiliary 00106 * 00107 * ===================================================================== 00108 SUBROUTINE ZLAG2C( M, N, A, LDA, SA, LDSA, INFO ) 00109 * 00110 * -- LAPACK auxiliary routine (version 3.4.0) -- 00111 * -- LAPACK is a software package provided by Univ. of Tennessee, -- 00112 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- 00113 * November 2011 00114 * 00115 * .. Scalar Arguments .. 00116 INTEGER INFO, LDA, LDSA, M, N 00117 * .. 00118 * .. Array Arguments .. 00119 COMPLEX SA( LDSA, * ) 00120 COMPLEX*16 A( LDA, * ) 00121 * .. 00122 * 00123 * ===================================================================== 00124 * 00125 * .. Local Scalars .. 00126 INTEGER I, J 00127 DOUBLE PRECISION RMAX 00128 * .. 00129 * .. Intrinsic Functions .. 00130 INTRINSIC DBLE, DIMAG 00131 * .. 00132 * .. External Functions .. 00133 REAL SLAMCH 00134 EXTERNAL SLAMCH 00135 * .. 00136 * .. Executable Statements .. 00137 * 00138 RMAX = SLAMCH( 'O' ) 00139 DO 20 J = 1, N 00140 DO 10 I = 1, M 00141 IF( ( DBLE( A( I, J ) ).LT.-RMAX ) .OR. 00142 $ ( DBLE( A( I, J ) ).GT.RMAX ) .OR. 00143 $ ( DIMAG( A( I, J ) ).LT.-RMAX ) .OR. 00144 $ ( DIMAG( A( I, J ) ).GT.RMAX ) ) THEN 00145 INFO = 1 00146 GO TO 30 00147 END IF 00148 SA( I, J ) = A( I, J ) 00149 10 CONTINUE 00150 20 CONTINUE 00151 INFO = 0 00152 30 CONTINUE 00153 RETURN 00154 * 00155 * End of ZLAG2C 00156 * 00157 END