clags2.c
Go to the documentation of this file.
00001 /* clags2.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 /* Subroutine */ int clags2_(logical *upper, real *a1, complex *a2, real *a3, 
00017         real *b1, complex *b2, real *b3, real *csu, complex *snu, real *csv, 
00018         complex *snv, real *csq, complex *snq)
00019 {
00020     /* System generated locals */
00021     real r__1, r__2, r__3, r__4, r__5, r__6, r__7, r__8;
00022     complex q__1, q__2, q__3, q__4, q__5;
00023 
00024     /* Builtin functions */
00025     double c_abs(complex *), r_imag(complex *);
00026     void r_cnjg(complex *, complex *);
00027 
00028     /* Local variables */
00029     real a;
00030     complex b, c__;
00031     real d__;
00032     complex r__, d1;
00033     real s1, s2, fb, fc;
00034     complex ua11, ua12, ua21, ua22, vb11, vb12, vb21, vb22;
00035     real csl, csr, snl, snr, aua11, aua12, aua21, aua22, avb11, avb12, avb21, 
00036             avb22, ua11r, ua22r, vb11r, vb22r;
00037     extern /* Subroutine */ int slasv2_(real *, real *, real *, real *, real *
00038 , real *, real *, real *, real *), clartg_(complex *, complex *, 
00039             real *, complex *, complex *);
00040 
00041 
00042 /*  -- LAPACK auxiliary routine (version 3.2) -- */
00043 /*     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */
00044 /*     November 2006 */
00045 
00046 /*     .. Scalar Arguments .. */
00047 /*     .. */
00048 
00049 /*  Purpose */
00050 /*  ======= */
00051 
00052 /*  CLAGS2 computes 2-by-2 unitary matrices U, V and Q, such */
00053 /*  that if ( UPPER ) then */
00054 
00055 /*            U'*A*Q = U'*( A1 A2 )*Q = ( x  0  ) */
00056 /*                        ( 0  A3 )     ( x  x  ) */
00057 /*  and */
00058 /*            V'*B*Q = V'*( B1 B2 )*Q = ( x  0  ) */
00059 /*                        ( 0  B3 )     ( x  x  ) */
00060 
00061 /*  or if ( .NOT.UPPER ) then */
00062 
00063 /*            U'*A*Q = U'*( A1 0  )*Q = ( x  x  ) */
00064 /*                        ( A2 A3 )     ( 0  x  ) */
00065 /*  and */
00066 /*            V'*B*Q = V'*( B1 0  )*Q = ( x  x  ) */
00067 /*                        ( B2 B3 )     ( 0  x  ) */
00068 /*  where */
00069 
00070 /*    U = (     CSU      SNU ), V = (     CSV     SNV ), */
00071 /*        ( -CONJG(SNU)  CSU )      ( -CONJG(SNV) CSV ) */
00072 
00073 /*    Q = (     CSQ      SNQ ) */
00074 /*        ( -CONJG(SNQ)  CSQ ) */
00075 
00076 /*  Z' denotes the conjugate transpose of Z. */
00077 
00078 /*  The rows of the transformed A and B are parallel. Moreover, if the */
00079 /*  input 2-by-2 matrix A is not zero, then the transformed (1,1) entry */
00080 /*  of A is not zero. If the input matrices A and B are both not zero, */
00081 /*  then the transformed (2,2) element of B is not zero, except when the */
00082 /*  first rows of input A and B are parallel and the second rows are */
00083 /*  zero. */
00084 
00085 /*  Arguments */
00086 /*  ========= */
00087 
00088 /*  UPPER   (input) LOGICAL */
00089 /*          = .TRUE.: the input matrices A and B are upper triangular. */
00090 /*          = .FALSE.: the input matrices A and B are lower triangular. */
00091 
00092 /*  A1      (input) REAL */
00093 /*  A2      (input) COMPLEX */
00094 /*  A3      (input) REAL */
00095 /*          On entry, A1, A2 and A3 are elements of the input 2-by-2 */
00096 /*          upper (lower) triangular matrix A. */
00097 
00098 /*  B1      (input) REAL */
00099 /*  B2      (input) COMPLEX */
00100 /*  B3      (input) REAL */
00101 /*          On entry, B1, B2 and B3 are elements of the input 2-by-2 */
00102 /*          upper (lower) triangular matrix B. */
00103 
00104 /*  CSU     (output) REAL */
00105 /*  SNU     (output) COMPLEX */
00106 /*          The desired unitary matrix U. */
00107 
00108 /*  CSV     (output) REAL */
00109 /*  SNV     (output) COMPLEX */
00110 /*          The desired unitary matrix V. */
00111 
00112 /*  CSQ     (output) REAL */
00113 /*  SNQ     (output) COMPLEX */
00114 /*          The desired unitary matrix Q. */
00115 
00116 /*  ===================================================================== */
00117 
00118 /*     .. Parameters .. */
00119 /*     .. */
00120 /*     .. Local Scalars .. */
00121 /*     .. */
00122 /*     .. External Subroutines .. */
00123 /*     .. */
00124 /*     .. Intrinsic Functions .. */
00125 /*     .. */
00126 /*     .. Statement Functions .. */
00127 /*     .. */
00128 /*     .. Statement Function definitions .. */
00129 /*     .. */
00130 /*     .. Executable Statements .. */
00131 
00132     if (*upper) {
00133 
00134 /*        Input matrices A and B are upper triangular matrices */
00135 
00136 /*        Form matrix C = A*adj(B) = ( a b ) */
00137 /*                                   ( 0 d ) */
00138 
00139         a = *a1 * *b3;
00140         d__ = *a3 * *b1;
00141         q__2.r = *b1 * a2->r, q__2.i = *b1 * a2->i;
00142         q__3.r = *a1 * b2->r, q__3.i = *a1 * b2->i;
00143         q__1.r = q__2.r - q__3.r, q__1.i = q__2.i - q__3.i;
00144         b.r = q__1.r, b.i = q__1.i;
00145         fb = c_abs(&b);
00146 
00147 /*        Transform complex 2-by-2 matrix C to real matrix by unitary */
00148 /*        diagonal matrix diag(1,D1). */
00149 
00150         d1.r = 1.f, d1.i = 0.f;
00151         if (fb != 0.f) {
00152             q__1.r = b.r / fb, q__1.i = b.i / fb;
00153             d1.r = q__1.r, d1.i = q__1.i;
00154         }
00155 
00156 /*        The SVD of real 2 by 2 triangular C */
00157 
00158 /*         ( CSL -SNL )*( A B )*(  CSR  SNR ) = ( R 0 ) */
00159 /*         ( SNL  CSL ) ( 0 D ) ( -SNR  CSR )   ( 0 T ) */
00160 
00161         slasv2_(&a, &fb, &d__, &s1, &s2, &snr, &csr, &snl, &csl);
00162 
00163         if (dabs(csl) >= dabs(snl) || dabs(csr) >= dabs(snr)) {
00164 
00165 /*           Compute the (1,1) and (1,2) elements of U'*A and V'*B, */
00166 /*           and (1,2) element of |U|'*|A| and |V|'*|B|. */
00167 
00168             ua11r = csl * *a1;
00169             q__2.r = csl * a2->r, q__2.i = csl * a2->i;
00170             q__4.r = snl * d1.r, q__4.i = snl * d1.i;
00171             q__3.r = *a3 * q__4.r, q__3.i = *a3 * q__4.i;
00172             q__1.r = q__2.r + q__3.r, q__1.i = q__2.i + q__3.i;
00173             ua12.r = q__1.r, ua12.i = q__1.i;
00174 
00175             vb11r = csr * *b1;
00176             q__2.r = csr * b2->r, q__2.i = csr * b2->i;
00177             q__4.r = snr * d1.r, q__4.i = snr * d1.i;
00178             q__3.r = *b3 * q__4.r, q__3.i = *b3 * q__4.i;
00179             q__1.r = q__2.r + q__3.r, q__1.i = q__2.i + q__3.i;
00180             vb12.r = q__1.r, vb12.i = q__1.i;
00181 
00182             aua12 = dabs(csl) * ((r__1 = a2->r, dabs(r__1)) + (r__2 = r_imag(
00183                     a2), dabs(r__2))) + dabs(snl) * dabs(*a3);
00184             avb12 = dabs(csr) * ((r__1 = b2->r, dabs(r__1)) + (r__2 = r_imag(
00185                     b2), dabs(r__2))) + dabs(snr) * dabs(*b3);
00186 
00187 /*           zero (1,2) elements of U'*A and V'*B */
00188 
00189             if (dabs(ua11r) + ((r__1 = ua12.r, dabs(r__1)) + (r__2 = r_imag(&
00190                     ua12), dabs(r__2))) == 0.f) {
00191                 q__2.r = vb11r, q__2.i = 0.f;
00192                 q__1.r = -q__2.r, q__1.i = -q__2.i;
00193                 r_cnjg(&q__3, &vb12);
00194                 clartg_(&q__1, &q__3, csq, snq, &r__);
00195             } else if (dabs(vb11r) + ((r__1 = vb12.r, dabs(r__1)) + (r__2 = 
00196                     r_imag(&vb12), dabs(r__2))) == 0.f) {
00197                 q__2.r = ua11r, q__2.i = 0.f;
00198                 q__1.r = -q__2.r, q__1.i = -q__2.i;
00199                 r_cnjg(&q__3, &ua12);
00200                 clartg_(&q__1, &q__3, csq, snq, &r__);
00201             } else if (aua12 / (dabs(ua11r) + ((r__1 = ua12.r, dabs(r__1)) + (
00202                     r__2 = r_imag(&ua12), dabs(r__2)))) <= avb12 / (dabs(
00203                     vb11r) + ((r__3 = vb12.r, dabs(r__3)) + (r__4 = r_imag(&
00204                     vb12), dabs(r__4))))) {
00205                 q__2.r = ua11r, q__2.i = 0.f;
00206                 q__1.r = -q__2.r, q__1.i = -q__2.i;
00207                 r_cnjg(&q__3, &ua12);
00208                 clartg_(&q__1, &q__3, csq, snq, &r__);
00209             } else {
00210                 q__2.r = vb11r, q__2.i = 0.f;
00211                 q__1.r = -q__2.r, q__1.i = -q__2.i;
00212                 r_cnjg(&q__3, &vb12);
00213                 clartg_(&q__1, &q__3, csq, snq, &r__);
00214             }
00215 
00216             *csu = csl;
00217             q__2.r = -d1.r, q__2.i = -d1.i;
00218             q__1.r = snl * q__2.r, q__1.i = snl * q__2.i;
00219             snu->r = q__1.r, snu->i = q__1.i;
00220             *csv = csr;
00221             q__2.r = -d1.r, q__2.i = -d1.i;
00222             q__1.r = snr * q__2.r, q__1.i = snr * q__2.i;
00223             snv->r = q__1.r, snv->i = q__1.i;
00224 
00225         } else {
00226 
00227 /*           Compute the (2,1) and (2,2) elements of U'*A and V'*B, */
00228 /*           and (2,2) element of |U|'*|A| and |V|'*|B|. */
00229 
00230             r_cnjg(&q__4, &d1);
00231             q__3.r = -q__4.r, q__3.i = -q__4.i;
00232             q__2.r = snl * q__3.r, q__2.i = snl * q__3.i;
00233             q__1.r = *a1 * q__2.r, q__1.i = *a1 * q__2.i;
00234             ua21.r = q__1.r, ua21.i = q__1.i;
00235             r_cnjg(&q__5, &d1);
00236             q__4.r = -q__5.r, q__4.i = -q__5.i;
00237             q__3.r = snl * q__4.r, q__3.i = snl * q__4.i;
00238             q__2.r = q__3.r * a2->r - q__3.i * a2->i, q__2.i = q__3.r * a2->i 
00239                     + q__3.i * a2->r;
00240             r__1 = csl * *a3;
00241             q__1.r = q__2.r + r__1, q__1.i = q__2.i;
00242             ua22.r = q__1.r, ua22.i = q__1.i;
00243 
00244             r_cnjg(&q__4, &d1);
00245             q__3.r = -q__4.r, q__3.i = -q__4.i;
00246             q__2.r = snr * q__3.r, q__2.i = snr * q__3.i;
00247             q__1.r = *b1 * q__2.r, q__1.i = *b1 * q__2.i;
00248             vb21.r = q__1.r, vb21.i = q__1.i;
00249             r_cnjg(&q__5, &d1);
00250             q__4.r = -q__5.r, q__4.i = -q__5.i;
00251             q__3.r = snr * q__4.r, q__3.i = snr * q__4.i;
00252             q__2.r = q__3.r * b2->r - q__3.i * b2->i, q__2.i = q__3.r * b2->i 
00253                     + q__3.i * b2->r;
00254             r__1 = csr * *b3;
00255             q__1.r = q__2.r + r__1, q__1.i = q__2.i;
00256             vb22.r = q__1.r, vb22.i = q__1.i;
00257 
00258             aua22 = dabs(snl) * ((r__1 = a2->r, dabs(r__1)) + (r__2 = r_imag(
00259                     a2), dabs(r__2))) + dabs(csl) * dabs(*a3);
00260             avb22 = dabs(snr) * ((r__1 = b2->r, dabs(r__1)) + (r__2 = r_imag(
00261                     b2), dabs(r__2))) + dabs(csr) * dabs(*b3);
00262 
00263 /*           zero (2,2) elements of U'*A and V'*B, and then swap. */
00264 
00265             if ((r__1 = ua21.r, dabs(r__1)) + (r__2 = r_imag(&ua21), dabs(
00266                     r__2)) + ((r__3 = ua22.r, dabs(r__3)) + (r__4 = r_imag(&
00267                     ua22), dabs(r__4))) == 0.f) {
00268                 r_cnjg(&q__2, &vb21);
00269                 q__1.r = -q__2.r, q__1.i = -q__2.i;
00270                 r_cnjg(&q__3, &vb22);
00271                 clartg_(&q__1, &q__3, csq, snq, &r__);
00272             } else if ((r__1 = vb21.r, dabs(r__1)) + (r__2 = r_imag(&vb21), 
00273                     dabs(r__2)) + c_abs(&vb22) == 0.f) {
00274                 r_cnjg(&q__2, &ua21);
00275                 q__1.r = -q__2.r, q__1.i = -q__2.i;
00276                 r_cnjg(&q__3, &ua22);
00277                 clartg_(&q__1, &q__3, csq, snq, &r__);
00278             } else if (aua22 / ((r__1 = ua21.r, dabs(r__1)) + (r__2 = r_imag(&
00279                     ua21), dabs(r__2)) + ((r__3 = ua22.r, dabs(r__3)) + (r__4 
00280                     = r_imag(&ua22), dabs(r__4)))) <= avb22 / ((r__5 = vb21.r,
00281                      dabs(r__5)) + (r__6 = r_imag(&vb21), dabs(r__6)) + ((
00282                     r__7 = vb22.r, dabs(r__7)) + (r__8 = r_imag(&vb22), dabs(
00283                     r__8))))) {
00284                 r_cnjg(&q__2, &ua21);
00285                 q__1.r = -q__2.r, q__1.i = -q__2.i;
00286                 r_cnjg(&q__3, &ua22);
00287                 clartg_(&q__1, &q__3, csq, snq, &r__);
00288             } else {
00289                 r_cnjg(&q__2, &vb21);
00290                 q__1.r = -q__2.r, q__1.i = -q__2.i;
00291                 r_cnjg(&q__3, &vb22);
00292                 clartg_(&q__1, &q__3, csq, snq, &r__);
00293             }
00294 
00295             *csu = snl;
00296             q__1.r = csl * d1.r, q__1.i = csl * d1.i;
00297             snu->r = q__1.r, snu->i = q__1.i;
00298             *csv = snr;
00299             q__1.r = csr * d1.r, q__1.i = csr * d1.i;
00300             snv->r = q__1.r, snv->i = q__1.i;
00301 
00302         }
00303 
00304     } else {
00305 
00306 /*        Input matrices A and B are lower triangular matrices */
00307 
00308 /*        Form matrix C = A*adj(B) = ( a 0 ) */
00309 /*                                   ( c d ) */
00310 
00311         a = *a1 * *b3;
00312         d__ = *a3 * *b1;
00313         q__2.r = *b3 * a2->r, q__2.i = *b3 * a2->i;
00314         q__3.r = *a3 * b2->r, q__3.i = *a3 * b2->i;
00315         q__1.r = q__2.r - q__3.r, q__1.i = q__2.i - q__3.i;
00316         c__.r = q__1.r, c__.i = q__1.i;
00317         fc = c_abs(&c__);
00318 
00319 /*        Transform complex 2-by-2 matrix C to real matrix by unitary */
00320 /*        diagonal matrix diag(d1,1). */
00321 
00322         d1.r = 1.f, d1.i = 0.f;
00323         if (fc != 0.f) {
00324             q__1.r = c__.r / fc, q__1.i = c__.i / fc;
00325             d1.r = q__1.r, d1.i = q__1.i;
00326         }
00327 
00328 /*        The SVD of real 2 by 2 triangular C */
00329 
00330 /*         ( CSL -SNL )*( A 0 )*(  CSR  SNR ) = ( R 0 ) */
00331 /*         ( SNL  CSL ) ( C D ) ( -SNR  CSR )   ( 0 T ) */
00332 
00333         slasv2_(&a, &fc, &d__, &s1, &s2, &snr, &csr, &snl, &csl);
00334 
00335         if (dabs(csr) >= dabs(snr) || dabs(csl) >= dabs(snl)) {
00336 
00337 /*           Compute the (2,1) and (2,2) elements of U'*A and V'*B, */
00338 /*           and (2,1) element of |U|'*|A| and |V|'*|B|. */
00339 
00340             q__4.r = -d1.r, q__4.i = -d1.i;
00341             q__3.r = snr * q__4.r, q__3.i = snr * q__4.i;
00342             q__2.r = *a1 * q__3.r, q__2.i = *a1 * q__3.i;
00343             q__5.r = csr * a2->r, q__5.i = csr * a2->i;
00344             q__1.r = q__2.r + q__5.r, q__1.i = q__2.i + q__5.i;
00345             ua21.r = q__1.r, ua21.i = q__1.i;
00346             ua22r = csr * *a3;
00347 
00348             q__4.r = -d1.r, q__4.i = -d1.i;
00349             q__3.r = snl * q__4.r, q__3.i = snl * q__4.i;
00350             q__2.r = *b1 * q__3.r, q__2.i = *b1 * q__3.i;
00351             q__5.r = csl * b2->r, q__5.i = csl * b2->i;
00352             q__1.r = q__2.r + q__5.r, q__1.i = q__2.i + q__5.i;
00353             vb21.r = q__1.r, vb21.i = q__1.i;
00354             vb22r = csl * *b3;
00355 
00356             aua21 = dabs(snr) * dabs(*a1) + dabs(csr) * ((r__1 = a2->r, dabs(
00357                     r__1)) + (r__2 = r_imag(a2), dabs(r__2)));
00358             avb21 = dabs(snl) * dabs(*b1) + dabs(csl) * ((r__1 = b2->r, dabs(
00359                     r__1)) + (r__2 = r_imag(b2), dabs(r__2)));
00360 
00361 /*           zero (2,1) elements of U'*A and V'*B. */
00362 
00363             if ((r__1 = ua21.r, dabs(r__1)) + (r__2 = r_imag(&ua21), dabs(
00364                     r__2)) + dabs(ua22r) == 0.f) {
00365                 q__1.r = vb22r, q__1.i = 0.f;
00366                 clartg_(&q__1, &vb21, csq, snq, &r__);
00367             } else if ((r__1 = vb21.r, dabs(r__1)) + (r__2 = r_imag(&vb21), 
00368                     dabs(r__2)) + dabs(vb22r) == 0.f) {
00369                 q__1.r = ua22r, q__1.i = 0.f;
00370                 clartg_(&q__1, &ua21, csq, snq, &r__);
00371             } else if (aua21 / ((r__1 = ua21.r, dabs(r__1)) + (r__2 = r_imag(&
00372                     ua21), dabs(r__2)) + dabs(ua22r)) <= avb21 / ((r__3 = 
00373                     vb21.r, dabs(r__3)) + (r__4 = r_imag(&vb21), dabs(r__4)) 
00374                     + dabs(vb22r))) {
00375                 q__1.r = ua22r, q__1.i = 0.f;
00376                 clartg_(&q__1, &ua21, csq, snq, &r__);
00377             } else {
00378                 q__1.r = vb22r, q__1.i = 0.f;
00379                 clartg_(&q__1, &vb21, csq, snq, &r__);
00380             }
00381 
00382             *csu = csr;
00383             r_cnjg(&q__3, &d1);
00384             q__2.r = -q__3.r, q__2.i = -q__3.i;
00385             q__1.r = snr * q__2.r, q__1.i = snr * q__2.i;
00386             snu->r = q__1.r, snu->i = q__1.i;
00387             *csv = csl;
00388             r_cnjg(&q__3, &d1);
00389             q__2.r = -q__3.r, q__2.i = -q__3.i;
00390             q__1.r = snl * q__2.r, q__1.i = snl * q__2.i;
00391             snv->r = q__1.r, snv->i = q__1.i;
00392 
00393         } else {
00394 
00395 /*           Compute the (1,1) and (1,2) elements of U'*A and V'*B, */
00396 /*           and (1,1) element of |U|'*|A| and |V|'*|B|. */
00397 
00398             r__1 = csr * *a1;
00399             r_cnjg(&q__4, &d1);
00400             q__3.r = snr * q__4.r, q__3.i = snr * q__4.i;
00401             q__2.r = q__3.r * a2->r - q__3.i * a2->i, q__2.i = q__3.r * a2->i 
00402                     + q__3.i * a2->r;
00403             q__1.r = r__1 + q__2.r, q__1.i = q__2.i;
00404             ua11.r = q__1.r, ua11.i = q__1.i;
00405             r_cnjg(&q__3, &d1);
00406             q__2.r = snr * q__3.r, q__2.i = snr * q__3.i;
00407             q__1.r = *a3 * q__2.r, q__1.i = *a3 * q__2.i;
00408             ua12.r = q__1.r, ua12.i = q__1.i;
00409 
00410             r__1 = csl * *b1;
00411             r_cnjg(&q__4, &d1);
00412             q__3.r = snl * q__4.r, q__3.i = snl * q__4.i;
00413             q__2.r = q__3.r * b2->r - q__3.i * b2->i, q__2.i = q__3.r * b2->i 
00414                     + q__3.i * b2->r;
00415             q__1.r = r__1 + q__2.r, q__1.i = q__2.i;
00416             vb11.r = q__1.r, vb11.i = q__1.i;
00417             r_cnjg(&q__3, &d1);
00418             q__2.r = snl * q__3.r, q__2.i = snl * q__3.i;
00419             q__1.r = *b3 * q__2.r, q__1.i = *b3 * q__2.i;
00420             vb12.r = q__1.r, vb12.i = q__1.i;
00421 
00422             aua11 = dabs(csr) * dabs(*a1) + dabs(snr) * ((r__1 = a2->r, dabs(
00423                     r__1)) + (r__2 = r_imag(a2), dabs(r__2)));
00424             avb11 = dabs(csl) * dabs(*b1) + dabs(snl) * ((r__1 = b2->r, dabs(
00425                     r__1)) + (r__2 = r_imag(b2), dabs(r__2)));
00426 
00427 /*           zero (1,1) elements of U'*A and V'*B, and then swap. */
00428 
00429             if ((r__1 = ua11.r, dabs(r__1)) + (r__2 = r_imag(&ua11), dabs(
00430                     r__2)) + ((r__3 = ua12.r, dabs(r__3)) + (r__4 = r_imag(&
00431                     ua12), dabs(r__4))) == 0.f) {
00432                 clartg_(&vb12, &vb11, csq, snq, &r__);
00433             } else if ((r__1 = vb11.r, dabs(r__1)) + (r__2 = r_imag(&vb11), 
00434                     dabs(r__2)) + ((r__3 = vb12.r, dabs(r__3)) + (r__4 = 
00435                     r_imag(&vb12), dabs(r__4))) == 0.f) {
00436                 clartg_(&ua12, &ua11, csq, snq, &r__);
00437             } else if (aua11 / ((r__1 = ua11.r, dabs(r__1)) + (r__2 = r_imag(&
00438                     ua11), dabs(r__2)) + ((r__3 = ua12.r, dabs(r__3)) + (r__4 
00439                     = r_imag(&ua12), dabs(r__4)))) <= avb11 / ((r__5 = vb11.r,
00440                      dabs(r__5)) + (r__6 = r_imag(&vb11), dabs(r__6)) + ((
00441                     r__7 = vb12.r, dabs(r__7)) + (r__8 = r_imag(&vb12), dabs(
00442                     r__8))))) {
00443                 clartg_(&ua12, &ua11, csq, snq, &r__);
00444             } else {
00445                 clartg_(&vb12, &vb11, csq, snq, &r__);
00446             }
00447 
00448             *csu = snr;
00449             r_cnjg(&q__2, &d1);
00450             q__1.r = csr * q__2.r, q__1.i = csr * q__2.i;
00451             snu->r = q__1.r, snu->i = q__1.i;
00452             *csv = snl;
00453             r_cnjg(&q__2, &d1);
00454             q__1.r = csl * q__2.r, q__1.i = csl * q__2.i;
00455             snv->r = q__1.r, snv->i = q__1.i;
00456 
00457         }
00458 
00459     }
00460 
00461     return 0;
00462 
00463 /*     End of CLAGS2 */
00464 
00465 } /* clags2_ */


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