Free cookie consent management tool by TermsFeed Policy Generator

source: branches/2789_MathNetNumerics-Exploration/HeuristicLab.Algorithms.DataAnalysis.Experimental/sbart/zrotg.f @ 16409

Last change on this file since 16409 was 15457, checked in by gkronber, 7 years ago

#2789 added Finbarr O'Sullivan smoothing spline code

File size: 797 bytes
Line 
1      SUBROUTINE ZROTG(CA,CB,C,S)
2*     .. Scalar Arguments ..
3      DOUBLE COMPLEX CA,CB,S
4      DOUBLE PRECISION C
5*     ..
6*
7*  Purpose
8*  =======
9*
10*     determines a double complex Givens rotation.
11*
12*     .. Local Scalars ..
13      DOUBLE COMPLEX ALPHA
14      DOUBLE PRECISION NORM,SCALE
15*     ..
16*     .. Intrinsic Functions ..
17      INTRINSIC CDABS,DCMPLX,DCONJG,DSQRT
18*     ..
19      IF (CDABS(CA).NE.0.0d0) GO TO 10
20      C = 0.0d0
21      S = (1.0d0,0.0d0)
22      CA = CB
23      GO TO 20
24   10 CONTINUE
25      SCALE = CDABS(CA) + CDABS(CB)
26      NORM = SCALE*DSQRT((CDABS(CA/DCMPLX(SCALE,0.0d0)))**2+
27     +       (CDABS(CB/DCMPLX(SCALE,0.0d0)))**2)
28      ALPHA = CA/CDABS(CA)
29      C = CDABS(CA)/NORM
30      S = ALPHA*DCONJG(CB)/NORM
31      CA = ALPHA*NORM
32   20 CONTINUE
33      RETURN
34      END
Note: See TracBrowser for help on using the repository browser.