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