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