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


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