00001 SUBROUTINE ZDIV(AR, AI, BR, BI, CR, CI) 00002 C***BEGIN PROLOGUE ZDIV 00003 C***REFER TO ZBESH,ZBESI,ZBESJ,ZBESK,ZBESY,ZAIRY,ZBIRY 00004 C 00005 C DOUBLE PRECISION COMPLEX DIVIDE C=A/B. 00006 C 00007 C***ROUTINES CALLED XZABS 00008 C***END PROLOGUE ZDIV 00009 DOUBLE PRECISION AR, AI, BR, BI, CR, CI, BM, CA, CB, CC, CD 00010 DOUBLE PRECISION XZABS 00011 BM = 1.0D0/XZABS(BR,BI) 00012 CC = BR*BM 00013 CD = BI*BM 00014 CA = (AR*CC+AI*CD)*BM 00015 CB = (AI*CC-AR*CD)*BM 00016 CR = CA 00017 CI = CB 00018 RETURN 00019 END