20 lines
492 B
Fortran
20 lines
492 B
Fortran
SUBROUTINE ZDIV(AR, AI, BR, BI, CR, CI)
|
|
C***BEGIN PROLOGUE ZDIV
|
|
C***REFER TO ZBESH,ZBESI,ZBESJ,ZBESK,ZBESY,ZAIRY,ZBIRY
|
|
C
|
|
C DOUBLE PRECISION COMPLEX DIVIDE C=A/B.
|
|
C
|
|
C***ROUTINES CALLED AZABS
|
|
C***END PROLOGUE ZDIV
|
|
DOUBLE PRECISION AR, AI, BR, BI, CR, CI, BM, CA, CB, CC, CD
|
|
DOUBLE PRECISION AZABS
|
|
BM = 1.0D0/AZABS(BR,BI)
|
|
CC = BR*BM
|
|
CD = BI*BM
|
|
CA = (AR*CC+AI*CD)*BM
|
|
CB = (AI*CC-AR*CD)*BM
|
|
CR = CA
|
|
CI = CB
|
|
RETURN
|
|
END
|