LAPACK  3.11.0
LAPACK: Linear Algebra PACKage
dlarmm.f
1 *> \brief \b DLARMM
2 *
3 * Definition:
4 * ===========
5 *
6 * DOUBLE PRECISION FUNCTION DLARMM( ANORM, BNORM, CNORM )
7 *
8 * .. Scalar Arguments ..
9 * DOUBLE PRECISION ANORM, BNORM, CNORM
10 * ..
11 *
12 *> \par Purpose:
13 * =======
14 *>
15 *> \verbatim
16 *>
17 *> DLARMM 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 DOUBLE PRECISION
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 DOUBLE PRECISION
40 *> The infinity norm of B. BNORM >= 0.
41 *> \endverbatim
42 *>
43 *> \param[in] CNORM
44 *> \verbatim
45 *> CNORM is DOUBLE PRECISION
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  DOUBLE PRECISION FUNCTION dlarmm( ANORM, BNORM, CNORM )
61  IMPLICIT NONE
62 * .. Scalar Arguments ..
63  DOUBLE PRECISION ANORM, BNORM, CNORM
64 * .. Parameters ..
65  DOUBLE PRECISION ONE, HALF, FOUR
66  parameter( one = 1.0d0, half = 0.5d+0, four = 4.0d0 )
67 * ..
68 * .. Local Scalars ..
69  DOUBLE PRECISION BIGNUM, SMLNUM
70 * ..
71 * .. External Functions ..
72  DOUBLE PRECISION DLAMCH
73  EXTERNAL dlamch
74 * ..
75 * .. Executable Statements ..
76 *
77 *
78 * Determine machine dependent parameters to control overflow.
79 *
80  smlnum = dlamch( 'Safe minimum' ) / dlamch( 'Precision' )
81  bignum = ( one / smlnum ) / four
82 *
83 * Compute a scale factor.
84 *
85  dlarmm = one
86  IF( bnorm .LE. one ) THEN
87  IF( anorm * bnorm .GT. bignum - cnorm ) THEN
88  dlarmm = half
89  END IF
90  ELSE
91  IF( anorm .GT. (bignum - cnorm) / bnorm ) THEN
92  dlarmm = half / bnorm
93  END IF
94  END IF
95  RETURN
96 *
97 * ==== End of DLARMM ====
98 *
99  END
double precision function dlarmm(ANORM, BNORM, CNORM)
DLARMM
Definition: dlarmm.f:61