LAPACK 3.12.0
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches

◆ dsxt1()

double precision function dsxt1 ( integer  ijob,
double precision, dimension( * )  d1,
integer  n1,
double precision, dimension( * )  d2,
integer  n2,
double precision  abstol,
double precision  ulp,
double precision  unfl 
)

DSXT1

Purpose:
 DSXT1  computes the difference between a set of eigenvalues.
 The result is returned as the function value.

 IJOB = 1:   Computes   max { min | D1(i)-D2(j) | }
                         i     j

 IJOB = 2:   Computes   max { min | D1(i)-D2(j) | /
                         i     j
                              ( ABSTOL + |D1(i)|*ULP ) }
Parameters
[in]IJOB
          IJOB is INTEGER
          Specifies the type of tests to be performed.  (See above.)
[in]D1
          D1 is DOUBLE PRECISION array, dimension (N1)
          The first array.  D1 should be in increasing order, i.e.,
          D1(j) <= D1(j+1).
[in]N1
          N1 is INTEGER
          The length of D1.
[in]D2
          D2 is DOUBLE PRECISION array, dimension (N2)
          The second array.  D2 should be in increasing order, i.e.,
          D2(j) <= D2(j+1).
[in]N2
          N2 is INTEGER
          The length of D2.
[in]ABSTOL
          ABSTOL is DOUBLE PRECISION
          The absolute tolerance, used as a measure of the error.
[in]ULP
          ULP is DOUBLE PRECISION
          Machine precision.
[in]UNFL
          UNFL is DOUBLE PRECISION
          The smallest positive number whose reciprocal does not
          overflow.
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.

Definition at line 104 of file dsxt1.f.

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 DOUBLE PRECISION ABSTOL, ULP, UNFL
114* ..
115* .. Array Arguments ..
116 DOUBLE PRECISION D1( * ), D2( * )
117* ..
118*
119* =====================================================================
120*
121* .. Parameters ..
122 DOUBLE PRECISION ZERO
123 parameter( zero = 0.0d0 )
124* ..
125* .. Local Scalars ..
126 INTEGER I, J
127 DOUBLE PRECISION 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 dsxt1 = temp1
157 RETURN
158*
159* End of DSXT1
160*
double precision function dsxt1(ijob, d1, n1, d2, n2, abstol, ulp, unfl)
DSXT1
Definition dsxt1.f:106
Here is the call graph for this function:
Here is the caller graph for this function: