OpenLibm/slatec/cshch.f
Viral B. Shah c977aa998f Add Makefile.extras to build libopenlibm-extras.
Replace amos with slatec
2012-12-31 16:37:05 -05:00

36 lines
938 B
Fortran

*DECK CSHCH
SUBROUTINE CSHCH (Z, CSH, CCH)
C***BEGIN PROLOGUE CSHCH
C***SUBSIDIARY
C***PURPOSE Subsidiary to CBESH and CBESK
C***LIBRARY SLATEC
C***TYPE ALL (CSHCH-A, ZSHCH-A)
C***AUTHOR Amos, D. E., (SNL)
C***DESCRIPTION
C
C CSHCH COMPUTES THE COMPLEX HYPERBOLIC FUNCTIONS CSH=SINH(X+I*Y)
C AND CCH=COSH(X+I*Y), WHERE I**2=-1.
C
C***SEE ALSO CBESH, CBESK
C***ROUTINES CALLED (NONE)
C***REVISION HISTORY (YYMMDD)
C 830501 DATE WRITTEN
C 910415 Prologue converted to Version 4.0 format. (BAB)
C***END PROLOGUE CSHCH
COMPLEX CCH, CSH, Z
REAL CCHI, CCHR, CH, CN, CSHI, CSHR, SH, SN, X, Y
C***FIRST EXECUTABLE STATEMENT CSHCH
X = REAL(Z)
Y = AIMAG(Z)
SH = SINH(X)
CH = COSH(X)
SN = SIN(Y)
CN = COS(Y)
CSHR = SH*CN
CSHI = CH*SN
CSH = CMPLX(CSHR,CSHI)
CCHR = CH*CN
CCHI = SH*SN
CCH = CMPLX(CCHR,CCHI)
RETURN
END