Fix saving lists of arrays with recent versions of numpy
[qpms.git] / amos / zdiv.f
blobf897f4ebf4be11ab949fbf3d64de34b516e249e5
1 SUBROUTINE ZDIV(AR, AI, BR, BI, CR, CI)
2 C***BEGIN PROLOGUE ZDIV
3 C***REFER TO ZBESH,ZBESI,ZBESJ,ZBESK,ZBESY,ZAIRY,ZBIRY
5 C DOUBLE PRECISION COMPLEX DIVIDE C=A/B.
7 C***ROUTINES CALLED AZABS
8 C***END PROLOGUE ZDIV
9 DOUBLE PRECISION AR, AI, BR, BI, CR, CI, BM, CA, CB, CC, CD
10 DOUBLE PRECISION AZABS
11 BM = 1.0D0/AZABS(BR,BI)
12 CC = BR*BM
13 CD = BI*BM
14 CA = (AR*CC+AI*CD)*BM
15 CB = (AI*CC-AR*CD)*BM
16 CR = CA
17 CI = CB
18 RETURN
19 END