zrotg.f.html
来自「famous linear algebra library (LAPACK) p」· HTML 代码 · 共 57 行
HTML
57 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>zrotg.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.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="ZROTG.1"></a><a href="zrotg.f.html#ZROTG.1">ZROTG</a>(CA,CB,C,S)
<span class="comment">*</span><span class="comment"> .. Scalar Arguments ..
</span> DOUBLE COMPLEX CA,CB,S
DOUBLE PRECISION C
<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"> determines a double complex Givens rotation.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> .. Local Scalars ..
</span> DOUBLE COMPLEX ALPHA
DOUBLE PRECISION NORM,SCALE
<span class="comment">*</span><span class="comment"> ..
</span><span class="comment">*</span><span class="comment"> .. Intrinsic Functions ..
</span> INTRINSIC CDABS,DCMPLX,DCONJG,DSQRT
<span class="comment">*</span><span class="comment"> ..
</span> IF (CDABS(CA).NE.0.0d0) GO TO 10
C = 0.0d0
S = (1.0d0,0.0d0)
CA = CB
GO TO 20
10 CONTINUE
SCALE = CDABS(CA) + CDABS(CB)
NORM = SCALE*DSQRT((CDABS(CA/DCMPLX(SCALE,0.0d0)))**2+
+ (CDABS(CB/DCMPLX(SCALE,0.0d0)))**2)
ALPHA = CA/CDABS(CA)
C = CDABS(CA)/NORM
S = ALPHA*DCONJG(CB)/NORM
CA = ALPHA*NORM
20 CONTINUE
RETURN
END
</pre>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?