zlargv.f.html

来自「famous linear algebra library (LAPACK) p」· HTML 代码 · 共 253 行 · 第 1/2 页

HTML
253
字号
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
 <head>
  <title>zlargv.f</title>
 <meta name="generator" content="emacs 21.3.1; htmlfontify 0.20">
<style type="text/css"><!-- 
body { background: rgb(255, 255, 255);  color: rgb(0, 0, 0);  font-style: normal;  font-weight: 500;  font-stretch: normal;  font-family: adobe-courier;  font-size: 11pt;  text-decoration: none; }
span.default   { background: rgb(255, 255, 255);  color: rgb(0, 0, 0);  font-style: normal;  font-weight: 500;  font-stretch: normal;  font-family: adobe-courier;  font-size: 11pt;  text-decoration: none; }
span.default a { background: rgb(255, 255, 255);  color: rgb(0, 0, 0);  font-style: normal;  font-weight: 500;  font-stretch: normal;  font-family: adobe-courier;  font-size: 11pt;  text-decoration: underline; }
span.string   { color: rgb(188, 143, 143);  background: rgb(255, 255, 255);  font-style: normal;  font-weight: 500;  font-stretch: normal;  font-family: adobe-courier;  font-size: 11pt;  text-decoration: none; }
span.string a { color: rgb(188, 143, 143);  background: rgb(255, 255, 255);  font-style: normal;  font-weight: 500;  font-stretch: normal;  font-family: adobe-courier;  font-size: 11pt;  text-decoration: underline; }
span.comment   { color: rgb(178, 34, 34);  background: rgb(255, 255, 255);  font-style: normal;  font-weight: 500;  font-stretch: normal;  font-family: adobe-courier;  font-size: 11pt;  text-decoration: none; }
span.comment a { color: rgb(178, 34, 34);  background: rgb(255, 255, 255);  font-style: normal;  font-weight: 500;  font-stretch: normal;  font-family: adobe-courier;  font-size: 11pt;  text-decoration: underline; }
 --></style>

 </head>
  <body>

<pre>
      SUBROUTINE <a name="ZLARGV.1"></a><a href="zlargv.f.html#ZLARGV.1">ZLARGV</a>( N, X, INCX, Y, INCY, C, INCC )
<span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  -- LAPACK auxiliary routine (version 3.1) --
</span><span class="comment">*</span><span class="comment">     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
</span><span class="comment">*</span><span class="comment">     November 2006
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">     .. Scalar Arguments ..
</span>      INTEGER            INCC, INCX, INCY, N
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. Array Arguments ..
</span>      DOUBLE PRECISION   C( * )
      COMPLEX*16         X( * ), Y( * )
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  Purpose
</span><span class="comment">*</span><span class="comment">  =======
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  <a name="ZLARGV.18"></a><a href="zlargv.f.html#ZLARGV.1">ZLARGV</a> generates a vector of complex plane rotations with real
</span><span class="comment">*</span><span class="comment">  cosines, determined by elements of the complex vectors x and y.
</span><span class="comment">*</span><span class="comment">  For i = 1,2,...,n
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">     (        c(i)   s(i) ) ( x(i) ) = ( r(i) )
</span><span class="comment">*</span><span class="comment">     ( -conjg(s(i))  c(i) ) ( y(i) ) = (   0  )
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">     where c(i)**2 + ABS(s(i))**2 = 1
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  The following conventions are used (these are the same as in <a name="ZLARTG.27"></a><a href="zlartg.f.html#ZLARTG.1">ZLARTG</a>,
</span><span class="comment">*</span><span class="comment">  but differ from the BLAS1 routine ZROTG):
</span><span class="comment">*</span><span class="comment">     If y(i)=0, then c(i)=1 and s(i)=0.
</span><span class="comment">*</span><span class="comment">     If x(i)=0, then c(i)=0 and s(i) is chosen so that r(i) is real.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  Arguments
</span><span class="comment">*</span><span class="comment">  =========
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  N       (input) INTEGER
</span><span class="comment">*</span><span class="comment">          The number of plane rotations to be generated.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  X       (input/output) COMPLEX*16 array, dimension (1+(N-1)*INCX)
</span><span class="comment">*</span><span class="comment">          On entry, the vector x.
</span><span class="comment">*</span><span class="comment">          On exit, x(i) is overwritten by r(i), for i = 1,...,n.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  INCX    (input) INTEGER
</span><span class="comment">*</span><span class="comment">          The increment between elements of X. INCX &gt; 0.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  Y       (input/output) COMPLEX*16 array, dimension (1+(N-1)*INCY)
</span><span class="comment">*</span><span class="comment">          On entry, the vector y.
</span><span class="comment">*</span><span class="comment">          On exit, the sines of the plane rotations.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  INCY    (input) INTEGER
</span><span class="comment">*</span><span class="comment">          The increment between elements of Y. INCY &gt; 0.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  C       (output) DOUBLE PRECISION array, dimension (1+(N-1)*INCC)
</span><span class="comment">*</span><span class="comment">          The cosines of the plane rotations.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  INCC    (input) INTEGER
</span><span class="comment">*</span><span class="comment">          The increment between elements of C. INCC &gt; 0.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  Further Details
</span><span class="comment">*</span><span class="comment">  ======= =======
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  6-6-96 - Modified with a new algorithm by W. Kahan and J. Demmel
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  This version has a few statements commented out for thread safety
</span><span class="comment">*</span><span class="comment">  (machine parameters are computed on each entry). 10 feb 03, SJH.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  =====================================================================
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">     .. Parameters ..
</span>      DOUBLE PRECISION   TWO, ONE, ZERO
      PARAMETER          ( TWO = 2.0D+0, ONE = 1.0D+0, ZERO = 0.0D+0 )
      COMPLEX*16         CZERO
      PARAMETER          ( CZERO = ( 0.0D+0, 0.0D+0 ) )
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. Local Scalars ..
</span><span class="comment">*</span><span class="comment">     LOGICAL            FIRST
</span>
      INTEGER            COUNT, I, IC, IX, IY, J
      DOUBLE PRECISION   CS, D, DI, DR, EPS, F2, F2S, G2, G2S, SAFMIN,
     $                   SAFMN2, SAFMX2, SCALE
      COMPLEX*16         F, FF, FS, G, GS, R, SN
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. External Functions ..
</span>      DOUBLE PRECISION   <a name="DLAMCH.83"></a><a href="dlamch.f.html#DLAMCH.1">DLAMCH</a>, <a name="DLAPY2.83"></a><a href="dlapy2.f.html#DLAPY2.1">DLAPY2</a>
      EXTERNAL           <a name="DLAMCH.84"></a><a href="dlamch.f.html#DLAMCH.1">DLAMCH</a>, <a name="DLAPY2.84"></a><a href="dlapy2.f.html#DLAPY2.1">DLAPY2</a>
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. Intrinsic Functions ..
</span>      INTRINSIC          ABS, DBLE, DCMPLX, DCONJG, DIMAG, INT, LOG,
     $                   MAX, SQRT
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. Statement Functions ..
</span>      DOUBLE PRECISION   ABS1, ABSSQ
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. Save statement ..
</span><span class="comment">*</span><span class="comment">     SAVE               FIRST, SAFMX2, SAFMIN, SAFMN2
</span><span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. Data statements ..
</span><span class="comment">*</span><span class="comment">     DATA               FIRST / .TRUE. /
</span><span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. Statement Function definitions ..
</span>      ABS1( FF ) = MAX( ABS( DBLE( FF ) ), ABS( DIMAG( FF ) ) )
      ABSSQ( FF ) = DBLE( FF )**2 + DIMAG( FF )**2
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. Executable Statements ..
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">     IF( FIRST ) THEN
</span><span class="comment">*</span><span class="comment">        FIRST = .FALSE.
</span>         SAFMIN = <a name="DLAMCH.107"></a><a href="dlamch.f.html#DLAMCH.1">DLAMCH</a>( <span class="string">'S'</span> )
         EPS = <a name="DLAMCH.108"></a><a href="dlamch.f.html#DLAMCH.1">DLAMCH</a>( <span class="string">'E'</span> )

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?