LAPACK 3.12.0
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches
slarmm.f
Go to the documentation of this file.
1*> \brief \b SLARMM
2*
3* Definition:
4* ===========
5*
6* REAL FUNCTION SLARMM( ANORM, BNORM, CNORM )
7*
8* .. Scalar Arguments ..
9* REAL ANORM, BNORM, CNORM
10* ..
11*
12*> \par Purpose:
13* =======
14*>
15*> \verbatim
16*>
17*> SLARMM returns a factor s in (0, 1] such that the linear updates
18*>
19*> (s * C) - A * (s * B) and (s * C) - (s * A) * B
20*>
21*> cannot overflow, where A, B, and C are matrices of conforming
22*> dimensions.
23*>
24*> This is an auxiliary routine so there is no argument checking.
25*> \endverbatim
26*
27* Arguments:
28* =========
29*
30*> \param[in] ANORM
31*> \verbatim
32*> ANORM is REAL
33*> The infinity norm of A. ANORM >= 0.
34*> The number of rows of the matrix A. M >= 0.
35*> \endverbatim
36*>
37*> \param[in] BNORM
38*> \verbatim
39*> BNORM is REAL
40*> The infinity norm of B. BNORM >= 0.
41*> \endverbatim
42*>
43*> \param[in] CNORM
44*> \verbatim
45*> CNORM is REAL
46*> The infinity norm of C. CNORM >= 0.
47*> \endverbatim
48*>
49*>
50* =====================================================================
51*> References:
52*> C. C. Kjelgaard Mikkelsen and L. Karlsson, Blocked Algorithms for
53*> Robust Solution of Triangular Linear Systems. In: International
54*> Conference on Parallel Processing and Applied Mathematics, pages
55*> 68--78. Springer, 2017.
56*>
57*> \ingroup larmm
58* =====================================================================
59
60 REAL function slarmm( anorm, bnorm, cnorm )
61 IMPLICIT NONE
62* .. Scalar Arguments ..
63 REAL anorm, bnorm, cnorm
64* .. Parameters ..
65 REAL one, half, four
66 parameter( one = 1.0e0, half = 0.5e+0, four = 4.0e+0 )
67* ..
68* .. Local Scalars ..
69 REAL bignum, smlnum
70* ..
71* .. External Functions ..
72 REAL slamch
73 EXTERNAL slamch
74* ..
75* .. Executable Statements ..
76*
77*
78* Determine machine dependent parameters to control overflow.
79*
80 smlnum = slamch( 'Safe minimum' ) / slamch( 'Precision' )
81 bignum = ( one / smlnum ) / four
82*
83* Compute a scale factor.
84*
85 slarmm = one
86 IF( bnorm .LE. one ) THEN
87 IF( anorm * bnorm .GT. bignum - cnorm ) THEN
88 slarmm = half
89 END IF
90 ELSE
91 IF( anorm .GT. (bignum - cnorm) / bnorm ) THEN
92 slarmm = half / bnorm
93 END IF
94 END IF
95 RETURN
96*
97* ==== End of SLARMM ====
98*
99 END
real function slamch(cmach)
SLAMCH
Definition slamch.f:68
real function slarmm(anorm, bnorm, cnorm)
SLARMM
Definition slarmm.f:61