mirror of
https://git.planet-casio.com/Lephenixnoir/OpenLibm.git
synced 2025-01-01 06:23:39 +01:00
c977aa998f
Replace amos with slatec
32 lines
882 B
Fortran
32 lines
882 B
Fortran
*DECK ZDIV
|
|
SUBROUTINE ZDIV (AR, AI, BR, BI, CR, CI)
|
|
C***BEGIN PROLOGUE ZDIV
|
|
C***SUBSIDIARY
|
|
C***PURPOSE Subsidiary to ZBESH, ZBESI, ZBESJ, ZBESK, ZBESY, ZAIRY and
|
|
C ZBIRY
|
|
C***LIBRARY SLATEC
|
|
C***TYPE ALL (ZDIV-A)
|
|
C***AUTHOR Amos, D. E., (SNL)
|
|
C***DESCRIPTION
|
|
C
|
|
C DOUBLE PRECISION COMPLEX DIVIDE C=A/B.
|
|
C
|
|
C***SEE ALSO ZAIRY, ZBESH, ZBESI, ZBESJ, ZBESK, ZBESY, ZBIRY
|
|
C***ROUTINES CALLED ZABS
|
|
C***REVISION HISTORY (YYMMDD)
|
|
C 830501 DATE WRITTEN
|
|
C 910415 Prologue converted to Version 4.0 format. (BAB)
|
|
C***END PROLOGUE ZDIV
|
|
DOUBLE PRECISION AR, AI, BR, BI, CR, CI, BM, CA, CB, CC, CD
|
|
DOUBLE PRECISION ZABS
|
|
EXTERNAL ZABS
|
|
C***FIRST EXECUTABLE STATEMENT ZDIV
|
|
BM = 1.0D0/ZABS(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
|