LAPACK 3.12.0
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches
ssxt1.f
Go to the documentation of this file.
1*> \brief \b SSXT1
2*
3* =========== DOCUMENTATION ===========
4*
5* Online html documentation available at
6* http://www.netlib.org/lapack/explore-html/
7*
8* Definition:
9* ===========
10*
11* REAL FUNCTION SSXT1( IJOB, D1, N1, D2, N2, ABSTOL,
12* ULP, UNFL )
13*
14* .. Scalar Arguments ..
15* INTEGER IJOB, N1, N2
16* REAL ABSTOL, ULP, UNFL
17* ..
18* .. Array Arguments ..
19* REAL D1( * ), D2( * )
20* ..
21*
22*
23*> \par Purpose:
24* =============
25*>
26*> \verbatim
27*>
28*> SSXT1 computes the difference between a set of eigenvalues.
29*> The result is returned as the function value.
30*>
31*> IJOB = 1: Computes max { min | D1(i)-D2(j) | }
32*> i j
33*>
34*> IJOB = 2: Computes max { min | D1(i)-D2(j) | /
35*> i j
36*> ( ABSTOL + |D1(i)|*ULP ) }
37*> \endverbatim
38*
39* Arguments:
40* ==========
41*
42*> \param[in] IJOB
43*> \verbatim
44*> IJOB is INTEGER
45*> Specifies the type of tests to be performed. (See above.)
46*> \endverbatim
47*>
48*> \param[in] D1
49*> \verbatim
50*> D1 is REAL array, dimension (N1)
51*> The first array. D1 should be in increasing order, i.e.,
52*> D1(j) <= D1(j+1).
53*> \endverbatim
54*>
55*> \param[in] N1
56*> \verbatim
57*> N1 is INTEGER
58*> The length of D1.
59*> \endverbatim
60*>
61*> \param[in] D2
62*> \verbatim
63*> D2 is REAL array, dimension (N2)
64*> The second array. D2 should be in increasing order, i.e.,
65*> D2(j) <= D2(j+1).
66*> \endverbatim
67*>
68*> \param[in] N2
69*> \verbatim
70*> N2 is INTEGER
71*> The length of D2.
72*> \endverbatim
73*>
74*> \param[in] ABSTOL
75*> \verbatim
76*> ABSTOL is REAL
77*> The absolute tolerance, used as a measure of the error.
78*> \endverbatim
79*>
80*> \param[in] ULP
81*> \verbatim
82*> ULP is REAL
83*> Machine precision.
84*> \endverbatim
85*>
86*> \param[in] UNFL
87*> \verbatim
88*> UNFL is REAL
89*> The smallest positive number whose reciprocal does not
90*> overflow.
91*> \endverbatim
92*
93* Authors:
94* ========
95*
96*> \author Univ. of Tennessee
97*> \author Univ. of California Berkeley
98*> \author Univ. of Colorado Denver
99*> \author NAG Ltd.
100*
101*> \ingroup single_eig
102*
103* =====================================================================
104 REAL function ssxt1( ijob, d1, n1, d2, n2, abstol,
105 $ ulp, unfl )
106*
107* -- LAPACK test 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 ijob, n1, n2
113 REAL abstol, ulp, unfl
114* ..
115* .. Array Arguments ..
116 REAL d1( * ), d2( * )
117* ..
118*
119* =====================================================================
120*
121* .. Parameters ..
122 REAL zero
123 parameter( zero = 0.0e0 )
124* ..
125* .. Local Scalars ..
126 INTEGER i, j
127 REAL temp1, temp2
128* ..
129* .. Intrinsic Functions ..
130 INTRINSIC abs, max, min
131* ..
132* .. Executable Statements ..
133*
134 temp1 = zero
135*
136 j = 1
137 DO 20 i = 1, n1
138 10 CONTINUE
139 IF( d2( j ).LT.d1( i ) .AND. j.LT.n2 ) THEN
140 j = j + 1
141 GO TO 10
142 END IF
143 IF( j.EQ.1 ) THEN
144 temp2 = abs( d2( j )-d1( i ) )
145 IF( ijob.EQ.2 )
146 $ temp2 = temp2 / max( unfl, abstol+ulp*abs( d1( i ) ) )
147 ELSE
148 temp2 = min( abs( d2( j )-d1( i ) ),
149 $ abs( d1( i )-d2( j-1 ) ) )
150 IF( ijob.EQ.2 )
151 $ temp2 = temp2 / max( unfl, abstol+ulp*abs( d1( i ) ) )
152 END IF
153 temp1 = max( temp1, temp2 )
154 20 CONTINUE
155*
156 ssxt1 = temp1
157 RETURN
158*
159* End of SSXT1
160*
161 END
real function ssxt1(ijob, d1, n1, d2, n2, abstol, ulp, unfl)
SSXT1
Definition ssxt1.f:106