LAPACK
3.9.1
LAPACK: Linear Algebra PACKage
crotg.f
Go to the documentation of this file.
1
*> \brief \b CROTG
2
*
3
* =========== DOCUMENTATION ===========
4
*
5
* Online html documentation available at
6
* http://www.netlib.org/lapack/explore-html/
7
*
8
* Definition:
9
* ===========
10
*
11
* SUBROUTINE CROTG(CA,CB,C,S)
12
*
13
* .. Scalar Arguments ..
14
* COMPLEX CA,CB,S
15
* REAL C
16
* ..
17
*
18
*
19
*> \par Purpose:
20
* =============
21
*>
22
*> \verbatim
23
*>
24
*> CROTG determines a complex Givens rotation.
25
*> \endverbatim
26
*
27
* Arguments:
28
* ==========
29
*
30
*> \param[in,out] CA
31
*> \verbatim
32
*> CA is COMPLEX
33
*> \endverbatim
34
*>
35
*> \param[in] CB
36
*> \verbatim
37
*> CB is COMPLEX
38
*> \endverbatim
39
*>
40
*> \param[out] C
41
*> \verbatim
42
*> C is REAL
43
*> \endverbatim
44
*>
45
*> \param[out] S
46
*> \verbatim
47
*> S is COMPLEX
48
*> \endverbatim
49
*
50
* Authors:
51
* ========
52
*
53
*> \author Univ. of Tennessee
54
*> \author Univ. of California Berkeley
55
*> \author Univ. of Colorado Denver
56
*> \author NAG Ltd.
57
*
58
*> \ingroup complex_blas_level1
59
*
60
* =====================================================================
61
SUBROUTINE
crotg
(CA,CB,C,S)
62
*
63
* -- Reference BLAS level1 routine --
64
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
65
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
66
*
67
* .. Scalar Arguments ..
68
COMPLEX
CA,CB,S
69
REAL
C
70
* ..
71
*
72
* =====================================================================
73
*
74
* .. Local Scalars ..
75
COMPLEX
ALPHA
76
REAL
NORM,SCALE
77
* ..
78
* .. Intrinsic Functions ..
79
INTRINSIC
cabs,conjg,sqrt
80
* ..
81
IF
(cabs(ca).EQ.0.)
THEN
82
c = 0.
83
s = (1.,0.)
84
ca = cb
85
ELSE
86
scale = cabs(ca) + cabs(cb)
87
norm = scale*sqrt((cabs(ca/scale))**2+ (cabs(cb/scale))**2)
88
alpha = ca/cabs(ca)
89
c = cabs(ca)/norm
90
s = alpha*conjg(cb)/norm
91
ca = alpha*norm
92
END IF
93
RETURN
94
END
crotg
subroutine crotg(CA, CB, C, S)
CROTG
Definition:
crotg.f:62
BLAS
SRC
crotg.f
Generated on Thu Apr 1 2021 10:08:14 for LAPACK by
1.9.1