zlctes.c
Go to the documentation of this file.
00001 /* zlctes.f -- translated by f2c (version 20061008).
00002    You must link the resulting object file with libf2c:
00003         on Microsoft Windows system, link with libf2c.lib;
00004         on Linux or Unix systems, link with .../path/to/libf2c.a -lm
00005         or, if you install libf2c.a in a standard place, with -lf2c -lm
00006         -- in that order, at the end of the command line, as in
00007                 cc *.o -lf2c -lm
00008         Source for libf2c is in /netlib/f2c/libf2c.zip, e.g.,
00009 
00010                 http://www.netlib.org/f2c/libf2c.zip
00011 */
00012 
00013 #include "f2c.h"
00014 #include "blaswrap.h"
00015 
00016 /* Table of constant values */
00017 
00018 static doublereal c_b3 = 1.;
00019 
00020 logical zlctes_(doublecomplex *z__, doublecomplex *d__)
00021 {
00022     /* System generated locals */
00023     doublereal d__1, d__2, d__3, d__4;
00024     logical ret_val;
00025 
00026     /* Builtin functions */
00027     double d_imag(doublecomplex *), d_sign(doublereal *, doublereal *);
00028 
00029     /* Local variables */
00030     doublereal zmax;
00031 
00032 
00033 /*  -- LAPACK test routine (version 3.1) -- */
00034 /*     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */
00035 /*     November 2006 */
00036 
00037 /*     .. Scalar Arguments .. */
00038 /*     .. */
00039 
00040 /*  Purpose */
00041 /*  ======= */
00042 
00043 /*  ZLCTES returns .TRUE. if the eigenvalue Z/D is to be selected */
00044 /*  (specifically, in this subroutine, if the real part of the */
00045 /*  eigenvalue is negative), and otherwise it returns .FALSE.. */
00046 
00047 /*  It is used by the test routine ZDRGES to test whether the driver */
00048 /*  routine ZGGES succesfully sorts eigenvalues. */
00049 
00050 /*  Arguments */
00051 /*  ========= */
00052 
00053 /*  Z       (input) COMPLEX*16 */
00054 /*          The numerator part of a complex eigenvalue Z/D. */
00055 
00056 /*  D       (input) COMPLEX*16 */
00057 /*          The denominator part of a complex eigenvalue Z/D. */
00058 
00059 /*  ===================================================================== */
00060 
00061 /*     .. Parameters .. */
00062 
00063 /*     .. */
00064 /*     .. Local Scalars .. */
00065 /*     .. */
00066 /*     .. Intrinsic Functions .. */
00067 /*     .. */
00068 /*     .. Executable Statements .. */
00069 
00070     if (d__->r == 0. && d__->i == 0.) {
00071         ret_val = z__->r < 0.;
00072     } else {
00073         if (z__->r == 0. || d__->r == 0.) {
00074             d__1 = d_imag(z__);
00075             d__2 = d_imag(d__);
00076             ret_val = d_sign(&c_b3, &d__1) != d_sign(&c_b3, &d__2);
00077         } else if (d_imag(z__) == 0. || d_imag(d__) == 0.) {
00078             d__1 = z__->r;
00079             d__2 = d__->r;
00080             ret_val = d_sign(&c_b3, &d__1) != d_sign(&c_b3, &d__2);
00081         } else {
00082 /* Computing MAX */
00083             d__3 = (d__1 = z__->r, abs(d__1)), d__4 = (d__2 = d_imag(z__), 
00084                     abs(d__2));
00085             zmax = max(d__3,d__4);
00086             ret_val = z__->r / zmax * d__->r + d_imag(z__) / zmax * d_imag(
00087                     d__) < 0.;
00088         }
00089     }
00090 
00091     return ret_val;
00092 
00093 /*     End of ZLCTES */
00094 
00095 } /* zlctes_ */


swiftnav
Author(s):
autogenerated on Sat Jun 8 2019 18:56:42