GNU Octave  3.8.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
cshch.f
Go to the documentation of this file.
1  SUBROUTINE cshch(Z, CSH, CCH)
2 C***BEGIN PROLOGUE CSHCH
3 C***REFER TO CBESK,CBESH
4 C
5 C CSHCH COMPUTES THE COMPLEX HYPERBOLIC FUNCTIONS CSH=SINH(X+I*Y)
6 C AND CCH=COSH(X+I*Y), WHERE I**2=-1.
7 C
8 C***ROUTINES CALLED (NONE)
9 C***END PROLOGUE CSHCH
10  COMPLEX cch, csh, z
11  REAL cchi, cchr, ch, cn, cshi, cshr, sh, sn, x, y, cosh, sinh
12  x = REAL(z)
13  y = aimag(z)
14  sh = sinh(x)
15  ch = cosh(x)
16  sn = sin(y)
17  cn = cos(y)
18  cshr = sh*cn
19  cshi = ch*sn
20  csh = cmplx(cshr,cshi)
21  cchr = ch*cn
22  cchi = sh*sn
23  cch = cmplx(cchr,cchi)
24  RETURN
25  END