LAPACK 3.12.0 LAPACK: Linear Algebra PACKage
Searching...
No Matches
dlag2s.f
Go to the documentation of this file.
1*> \brief \b DLAG2S converts a double precision matrix to a single precision matrix.
2*
3* =========== DOCUMENTATION ===========
4*
5* Online html documentation available at
6* http://www.netlib.org/lapack/explore-html/
7*
8*> \htmlonly
10*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlag2s.f">
11*> [TGZ]</a>
12*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlag2s.f">
13*> [ZIP]</a>
14*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlag2s.f">
15*> [TXT]</a>
16*> \endhtmlonly
17*
18* Definition:
19* ===========
20*
21* SUBROUTINE DLAG2S( M, N, A, LDA, SA, LDSA, INFO )
22*
23* .. Scalar Arguments ..
24* INTEGER INFO, LDA, LDSA, M, N
25* ..
26* .. Array Arguments ..
27* REAL SA( LDSA, * )
28* DOUBLE PRECISION A( LDA, * )
29* ..
30*
31*
32*> \par Purpose:
33* =============
34*>
35*> \verbatim
36*>
37*> DLAG2S converts a DOUBLE PRECISION matrix, A, to a SINGLE
38*> PRECISION matrix, SA.
39*>
40*> RMAX is the overflow for the SINGLE PRECISION arithmetic
41*> DLAG2S checks that all the entries of A are between -RMAX and
42*> RMAX. If not the conversion is aborted and a flag is raised.
43*>
44*> This is an auxiliary routine so there is no argument checking.
45*> \endverbatim
46*
47* Arguments:
48* ==========
49*
50*> \param[in] M
51*> \verbatim
52*> M is INTEGER
53*> The number of lines of the matrix A. M >= 0.
54*> \endverbatim
55*>
56*> \param[in] N
57*> \verbatim
58*> N is INTEGER
59*> The number of columns of the matrix A. N >= 0.
60*> \endverbatim
61*>
62*> \param[in] A
63*> \verbatim
64*> A is DOUBLE PRECISION array, dimension (LDA,N)
65*> On entry, the M-by-N coefficient matrix A.
66*> \endverbatim
67*>
68*> \param[in] LDA
69*> \verbatim
70*> LDA is INTEGER
71*> The leading dimension of the array A. LDA >= max(1,M).
72*> \endverbatim
73*>
74*> \param[out] SA
75*> \verbatim
76*> SA is REAL array, dimension (LDSA,N)
77*> On exit, if INFO=0, the M-by-N coefficient matrix SA; if
78*> INFO>0, the content of SA is unspecified.
79*> \endverbatim
80*>
81*> \param[in] LDSA
82*> \verbatim
83*> LDSA is INTEGER
84*> The leading dimension of the array SA. LDSA >= max(1,M).
85*> \endverbatim
86*>
87*> \param[out] INFO
88*> \verbatim
89*> INFO is INTEGER
90*> = 0: successful exit.
91*> = 1: an entry of the matrix A is greater than the SINGLE
92*> PRECISION overflow threshold, in this case, the content
93*> of SA in exit is unspecified.
94*> \endverbatim
95*
96* Authors:
97* ========
98*
99*> \author Univ. of Tennessee
100*> \author Univ. of California Berkeley
101*> \author Univ. of Colorado Denver
102*> \author NAG Ltd.
103*
104*> \ingroup _lag2_
105*
106* =====================================================================
107 SUBROUTINE dlag2s( M, N, A, LDA, SA, LDSA, INFO )
108*
109* -- LAPACK auxiliary routine --
110* -- LAPACK is a software package provided by Univ. of Tennessee, --
111* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
112*
113* .. Scalar Arguments ..
114 INTEGER INFO, LDA, LDSA, M, N
115* ..
116* .. Array Arguments ..
117 REAL SA( LDSA, * )
118 DOUBLE PRECISION A( LDA, * )
119* ..
120*
121* =====================================================================
122*
123* .. Local Scalars ..
124 INTEGER I, J
125 DOUBLE PRECISION RMAX
126* ..
127* .. External Functions ..
128 REAL SLAMCH
129 EXTERNAL slamch
130* ..
131* .. Intrinsic Functions ..
132 INTRINSIC real
133* ..
134* .. Executable Statements ..
135*
136 rmax = slamch( 'O' )
137 DO 20 j = 1, n
138 DO 10 i = 1, m
139 IF( ( a( i, j ).LT.-rmax ) .OR. ( a( i, j ).GT.rmax ) ) THEN
140 info = 1
141 GO TO 30
142 END IF
143 sa( i, j ) = real( a( i, j ) )
144 10 CONTINUE
145 20 CONTINUE
146 info = 0
147 30 CONTINUE
148 RETURN
149*
150* End of DLAG2S
151*
152 END
subroutine dlag2s(m, n, a, lda, sa, ldsa, info)
DLAG2S converts a double precision matrix to a single precision matrix.
Definition dlag2s.f:108