~ubuntu-branches/ubuntu/trusty/nwchem/trusty-proposed

« back to all changes in this revision

Viewing changes to src/lapack/single/slartg.f

  • Committer: Package Import Robot
  • Author(s): Michael Banck, Daniel Leidert, Andreas Tille, Michael Banck
  • Date: 2013-07-04 12:14:55 UTC
  • mfrom: (1.1.2)
  • Revision ID: package-import@ubuntu.com-20130704121455-5tvsx2qabor3nrui
Tags: 6.3-1
* New upstream release.
* Fixes anisotropic properties (Closes: #696361).
* New features include:
  + Multi-reference coupled cluster (MRCC) approaches
  + Hybrid DFT calculations with short-range HF 
  + New density-functionals including Minnesota (M08, M11) and HSE hybrid
    functionals
  + X-ray absorption spectroscopy (XAS) with TDDFT
  + Analytical gradients for the COSMO solvation model
  + Transition densities from TDDFT 
  + DFT+U and Electron-Transfer (ET) methods for plane wave calculations
  + Exploitation of space group symmetry in plane wave geometry optimizations
  + Local density of states (LDOS) collective variable added to Metadynamics
  + Various new XC functionals added for plane wave calculations, including
    hybrid and range-corrected ones
  + Electric field gradients with relativistic corrections 
  + Nudged Elastic Band optimization method
  + Updated basis sets and ECPs 

[ Daniel Leidert ]
* debian/watch: Fixed.

[ Andreas Tille ]
* debian/upstream: References

[ Michael Banck ]
* debian/upstream (Name): New field.
* debian/patches/02_makefile_flags.patch: Refreshed.
* debian/patches/06_statfs_kfreebsd.patch: Likewise.
* debian/patches/07_ga_target_force_linux.patch: Likewise.
* debian/patches/05_avoid_inline_assembler.patch: Removed, no longer needed.
* debian/patches/09_backported_6.1.1_fixes.patch: Likewise.
* debian/control (Build-Depends): Added gfortran-4.7 and gcc-4.7.
* debian/patches/10_force_gcc-4.7.patch: New patch, explicitly sets
  gfortran-4.7 and gcc-4.7, fixes test suite hang with gcc-4.8 (Closes:
  #701328, #713262).
* debian/testsuite: Added tests for COSMO analytical gradients and MRCC.
* debian/rules (MRCC_METHODS): New variable, required to enable MRCC methods.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
*> \brief \b SLARTG generates a plane rotation with real cosine and real sine.
 
2
*
 
3
*  =========== DOCUMENTATION ===========
 
4
*
 
5
* Online html documentation available at 
 
6
*            http://www.netlib.org/lapack/explore-html/ 
 
7
*
 
8
*> \htmlonly
 
9
*> Download SLARTG + dependencies 
 
10
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/slartg.f"> 
 
11
*> [TGZ]</a> 
 
12
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/slartg.f"> 
 
13
*> [ZIP]</a> 
 
14
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/slartg.f"> 
 
15
*> [TXT]</a>
 
16
*> \endhtmlonly 
 
17
*
 
18
*  Definition:
 
19
*  ===========
 
20
*
 
21
*       SUBROUTINE SLARTG( F, G, CS, SN, R )
 
22
 
23
*       .. Scalar Arguments ..
 
24
*       REAL               CS, F, G, R, SN
 
25
*       ..
 
26
*  
 
27
*
 
28
*> \par Purpose:
 
29
*  =============
 
30
*>
 
31
*> \verbatim
 
32
*>
 
33
*> SLARTG generate a plane rotation so that
 
34
*>
 
35
*>    [  CS  SN  ]  .  [ F ]  =  [ R ]   where CS**2 + SN**2 = 1.
 
36
*>    [ -SN  CS  ]     [ G ]     [ 0 ]
 
37
*>
 
38
*> This is a slower, more accurate version of the BLAS1 routine SROTG,
 
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 SBDSQR when
 
44
*>       there are zeros on the diagonal).
 
45
*>
 
46
*> If F exceeds G in magnitude, CS will be positive.
 
47
*> \endverbatim
 
48
*
 
49
*  Arguments:
 
50
*  ==========
 
51
*
 
52
*> \param[in] F
 
53
*> \verbatim
 
54
*>          F is REAL
 
55
*>          The first component of vector to be rotated.
 
56
*> \endverbatim
 
57
*>
 
58
*> \param[in] G
 
59
*> \verbatim
 
60
*>          G is REAL
 
61
*>          The second component of vector to be rotated.
 
62
*> \endverbatim
 
63
*>
 
64
*> \param[out] CS
 
65
*> \verbatim
 
66
*>          CS is REAL
 
67
*>          The cosine of the rotation.
 
68
*> \endverbatim
 
69
*>
 
70
*> \param[out] SN
 
71
*> \verbatim
 
72
*>          SN is REAL
 
73
*>          The sine of the rotation.
 
74
*> \endverbatim
 
75
*>
 
76
*> \param[out] R
 
77
*> \verbatim
 
78
*>          R is REAL
 
79
*>          The nonzero component of the rotated vector.
 
80
*>
 
81
*>  This version has a few statements commented out for thread safety
 
82
*>  (machine parameters are computed on each entry). 10 feb 03, SJH.
 
83
*> \endverbatim
 
84
*
 
85
*  Authors:
 
86
*  ========
 
87
*
 
88
*> \author Univ. of Tennessee 
 
89
*> \author Univ. of California Berkeley 
 
90
*> \author Univ. of Colorado Denver 
 
91
*> \author NAG Ltd. 
 
92
*
 
93
*> \date September 2012
 
94
*
 
95
*> \ingroup auxOTHERauxiliary
 
96
*
 
97
*  =====================================================================
1
98
      SUBROUTINE SLARTG( F, G, CS, SN, R )
2
99
*
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
6
 
*     September 30, 1994
 
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..--
 
103
*     September 2012
7
104
*
8
105
*     .. Scalar Arguments ..
9
106
      REAL               CS, F, G, R, SN
10
107
*     ..
11
108
*
12
 
c
13
 
* $Id: slartg.f 19697 2010-10-29 16:57:34Z d3y133 $
14
 
c
15
 
*  Purpose
16
 
*  =======
17
 
*
18
 
*  SLARTG generate a plane rotation so that
19
 
*
20
 
*     [  CS  SN  ]  .  [ F ]  =  [ R ]   where CS**2 + SN**2 = 1.
21
 
*     [ -SN  CS  ]     [ G ]     [ 0 ]
22
 
*
23
 
*  This is a slower, more accurate version of the BLAS1 routine SROTG,
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 SBDSQR when
29
 
*        there are zeros on the diagonal).
30
 
*
31
 
*  If F exceeds G in magnitude, CS will be positive.
32
 
*
33
 
*  Arguments
34
 
*  =========
35
 
*
36
 
*  F       (input) REAL
37
 
*          The first component of vector to be rotated.
38
 
*
39
 
*  G       (input) REAL
40
 
*          The second component of vector to be rotated.
41
 
*
42
 
*  CS      (output) REAL
43
 
*          The cosine of the rotation.
44
 
*
45
 
*  SN      (output) REAL
46
 
*          The sine of the rotation.
47
 
*
48
 
*  R       (output) REAL
49
 
*          The nonzero component of the rotated vector.
50
 
*
51
109
*  =====================================================================
52
110
*
53
111
*     .. Parameters ..
59
117
      PARAMETER          ( TWO = 2.0E0 )
60
118
*     ..
61
119
*     .. Local Scalars ..
62
 
      LOGICAL            FIRST
 
120
*     LOGICAL            FIRST
63
121
      INTEGER            COUNT, I
64
122
      REAL               EPS, F1, G1, SAFMIN, SAFMN2, SAFMX2, SCALE
65
123
*     ..
71
129
      INTRINSIC          ABS, INT, LOG, MAX, SQRT
72
130
*     ..
73
131
*     .. Save statement ..
74
 
      SAVE               FIRST, SAFMX2, SAFMIN, SAFMN2
 
132
*     SAVE               FIRST, SAFMX2, SAFMIN, SAFMN2
75
133
*     ..
76
134
*     .. Data statements ..
77
 
      DATA               FIRST / .TRUE. /
 
135
*     DATA               FIRST / .TRUE. /
78
136
*     ..
79
137
*     .. Executable Statements ..
80
138
*
81
 
      IF( FIRST ) THEN
82
 
         FIRST = .FALSE.
 
139
*     IF( FIRST ) THEN
83
140
         SAFMIN = SLAMCH( 'S' )
84
141
         EPS = SLAMCH( 'E' )
85
142
         SAFMN2 = SLAMCH( 'B' )**INT( LOG( SAFMIN / EPS ) /
86
143
     $            LOG( SLAMCH( 'B' ) ) / TWO )
87
144
         SAFMX2 = ONE / SAFMN2
88
 
      END IF
 
145
*        FIRST = .FALSE.
 
146
*     END IF
89
147
      IF( G.EQ.ZERO ) THEN
90
148
         CS = ONE
91
149
         SN = ZERO