1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
|
LOGICAL FUNCTION DLCTES( ZR, ZI, D )
*
* -- LAPACK test routine (version 3.0) --
* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
* Courant Institute, Argonne National Lab, and Rice University
* June 30, 1999
*
* .. Scalar Arguments ..
DOUBLE PRECISION D, ZI, ZR
* ..
*
* Purpose
* =======
*
* DLCTES returns .TRUE. if the eigenvalue (ZR/D) + sqrt(-1)*(ZI/D)
* is to be selected (specifically, in this subroutine, if the real
* part of the eigenvalue is negative), and otherwise it returns
* .FALSE..
*
* It is used by the test routine DDRGES to test whether the driver
* routine DGGES succesfully sorts eigenvalues.
*
* Arguments
* =========
*
* ZR (input) DOUBLE PRECISION
* The numerator of the real part of a complex eigenvalue
* (ZR/D) + i*(ZI/D).
*
* ZI (input) DOUBLE PRECISION
* The numerator of the imaginary part of a complex eigenvalue
* (ZR/D) + i*(ZI).
*
* D (input) DOUBLE PRECISION
* The denominator part of a complex eigenvalue
* (ZR/D) + i*(ZI/D).
*
* =====================================================================
*
* .. Parameters ..
DOUBLE PRECISION ZERO, ONE
PARAMETER ( ZERO = 0.0D+0, ONE = 1.0D+0 )
* ..
* .. Intrinsic Functions ..
INTRINSIC SIGN
* ..
* .. Executable Statements ..
*
IF( D.EQ.ZERO ) THEN
DLCTES = ( ZR.LT.ZERO )
ELSE
DLCTES = ( SIGN( ONE, ZR ).NE.SIGN( ONE, D ) )
END IF
*
RETURN
*
* End of DLCTES
*
END
|