clctes.c
Go to the documentation of this file.
00001 /* clctes.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 real c_b3 = 1.f;
00019 
00020 logical clctes_(complex *z__, complex *d__)
00021 {
00022     /* System generated locals */
00023     real r__1, r__2, r__3, r__4;
00024     logical ret_val;
00025 
00026     /* Builtin functions */
00027     double r_imag(complex *), r_sign(real *, real *);
00028 
00029     /* Local variables */
00030     real 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 /*  CLCTES 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 CDRGES to test whether the driver */
00048 /*  routine CGGES succesfully sorts eigenvalues. */
00049 
00050 /*  Arguments */
00051 /*  ========= */
00052 
00053 /*  Z       (input) COMPLEX */
00054 /*          The numerator part of a complex eigenvalue Z/D. */
00055 
00056 /*  D       (input) COMPLEX */
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.f && d__->i == 0.f) {
00071         ret_val = z__->r < 0.f;
00072     } else {
00073         if (z__->r == 0.f || d__->r == 0.f) {
00074             r__1 = r_imag(z__);
00075             r__2 = r_imag(d__);
00076             ret_val = r_sign(&c_b3, &r__1) != r_sign(&c_b3, &r__2);
00077         } else if (r_imag(z__) == 0.f || r_imag(d__) == 0.f) {
00078             r__1 = z__->r;
00079             r__2 = d__->r;
00080             ret_val = r_sign(&c_b3, &r__1) != r_sign(&c_b3, &r__2);
00081         } else {
00082 /* Computing MAX */
00083             r__3 = (r__1 = z__->r, dabs(r__1)), r__4 = (r__2 = r_imag(z__), 
00084                     dabs(r__2));
00085             zmax = dmax(r__3,r__4);
00086             ret_val = z__->r / zmax * d__->r + r_imag(z__) / zmax * r_imag(
00087                     d__) < 0.f;
00088         }
00089     }
00090 
00091     return ret_val;
00092 
00093 /*     End of CLCTES */
00094 
00095 } /* clctes_ */


swiftnav
Author(s):
autogenerated on Sat Jun 8 2019 18:55:32