Go to the documentation of this file.00001 SUBROUTINE CROTG(CA,CB,C,S)
00002
00003 COMPLEX CA,CB,S
00004 REAL C
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 COMPLEX ALPHA
00016 REAL NORM,SCALE
00017
00018
00019 INTRINSIC CABS,CONJG,SQRT
00020
00021 IF (CABS(CA).NE.0.) GO TO 10
00022 C = 0.
00023 S = (1.,0.)
00024 CA = CB
00025 GO TO 20
00026 10 CONTINUE
00027 SCALE = CABS(CA) + CABS(CB)
00028 NORM = SCALE*SQRT((CABS(CA/SCALE))**2+ (CABS(CB/SCALE))**2)
00029 ALPHA = CA/CABS(CA)
00030 C = CABS(CA)/NORM
00031 S = ALPHA*CONJG(CB)/NORM
00032 CA = ALPHA*NORM
00033 20 CONTINUE
00034 RETURN
00035 END