1
*> \brief \b DLARTG generates a plane rotation with real cosine and real sine.
3
* =========== DOCUMENTATION ===========
5
* Online html documentation available at
6
* http://www.netlib.org/lapack/explore-html/
9
*> Download DLARTG + dependencies
10
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlartg.f">
12
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlartg.f">
14
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlartg.f">
21
* SUBROUTINE DLARTG( F, G, CS, SN, R )
23
* .. Scalar Arguments ..
24
* DOUBLE PRECISION CS, F, G, R, SN
33
*> DLARTG generate a plane rotation so that
35
*> [ CS SN ] . [ F ] = [ R ] where CS**2 + SN**2 = 1.
36
*> [ -SN CS ] [ G ] [ 0 ]
38
*> This is a slower, more accurate version of the BLAS1 routine DROTG,
39
*> with the following other differences:
40
*> F and G are unchanged on return.
41
*> If G=0, then CS=1 and SN=0.
42
*> If F=0 and (G .ne. 0), then CS=0 and SN=1 without doing any
43
*> floating point operations (saves work in DBDSQR when
44
*> there are zeros on the diagonal).
46
*> If F exceeds G in magnitude, CS will be positive.
54
*> F is DOUBLE PRECISION
55
*> The first component of vector to be rotated.
60
*> G is DOUBLE PRECISION
61
*> The second component of vector to be rotated.
66
*> CS is DOUBLE PRECISION
67
*> The cosine of the rotation.
72
*> SN is DOUBLE PRECISION
73
*> The sine of the rotation.
78
*> R is DOUBLE PRECISION
79
*> The nonzero component of the rotated vector.
81
*> This version has a few statements commented out for thread safety
82
*> (machine parameters are computed on each entry). 10 feb 03, SJH.
88
*> \author Univ. of Tennessee
89
*> \author Univ. of California Berkeley
90
*> \author Univ. of Colorado Denver
93
*> \date September 2012
95
*> \ingroup auxOTHERauxiliary
97
* =====================================================================
1
98
SUBROUTINE DLARTG( F, G, CS, SN, R )
3
* -- LAPACK auxiliary routine (version 2.0) --
4
* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
5
* Courant Institute, Argonne National Lab, and Rice University
100
* -- LAPACK auxiliary routine (version 3.4.2) --
101
* -- LAPACK is a software package provided by Univ. of Tennessee, --
102
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
8
105
* .. Scalar Arguments ..
9
106
DOUBLE PRECISION CS, F, G, R, SN
13
* $Id: dlartg.f 19697 2010-10-29 16:57:34Z d3y133 $
18
* DLARTG generate a plane rotation so that
20
* [ CS SN ] . [ F ] = [ R ] where CS**2 + SN**2 = 1.
21
* [ -SN CS ] [ G ] [ 0 ]
23
* This is a slower, more accurate version of the BLAS1 routine DROTG,
24
* with the following other differences:
25
* F and G are unchanged on return.
26
* If G=0, then CS=1 and SN=0.
27
* If F=0 and (G .ne. 0), then CS=0 and SN=1 without doing any
28
* floating point operations (saves work in DBDSQR when
29
* there are zeros on the diagonal).
31
* If F exceeds G in magnitude, CS will be positive.
36
* F (input) DOUBLE PRECISION
37
* The first component of vector to be rotated.
39
* G (input) DOUBLE PRECISION
40
* The second component of vector to be rotated.
42
* CS (output) DOUBLE PRECISION
43
* The cosine of the rotation.
45
* SN (output) DOUBLE PRECISION
46
* The sine of the rotation.
48
* R (output) DOUBLE PRECISION
49
* The nonzero component of the rotated vector.
51
109
* =====================================================================
53
111
* .. Parameters ..