/
/    C S I N
/    - - - -
/
/ VERSION 5A 4-27-77  PT
/
/COMPLEX SIN AND COS ROUTINE
/
/CCOS(X+I*Y)=COS(X)*COSH(Y)-SIN(X)*SINH(Y)
/
/CSIN(X+I*Y)=SIN(X)*COSH(Y)+COS(X)*SINH(Y)
/
/CALLS SIN,COS,COSH,SINH
/
	SECT	CSIN
	JA	#CSIN
	DPCHK
	TEXT	+CSIN  +
CSINXR,	SETX	XR
	SETB	BP
	JA	.+3
BP,	F 0.0
XR,	F 0.0
ARG,	F 0.0
	F 0.0
C,	F 0.0
CH,	F 0.0
S,	F 0.0
	ORG	10*3+BP
	FNOP
	JA	CSINXR
	0

RT,	JA	.
SH,	F 0.0
	BASE	0
#CSIN,	SETX	XR
	LDX	0,0
COM,	STARTD
	FLDA	10*3
	FSTA	RT
	FLDA	0
	SETB	BP
	BASE	BP
	LDX	1,1
	FSTA	BP
	FLDA%	BP,1
	FSTA	BP
	STARTE
	FLDA%	BP
	FSTA	ARG
	STARTF
	EXTERN	COS
	JSR	COS
	JA	CSA
	JA	ARG		/COS(X)
CSA,	FSTA	C
	EXTERN	SIN
	JSR	SIN
	JA	CSB
	JA	ARG
CSB,	FSTA	S		/SIN(X)
	EXTERN	SINH
	JSR	SINH
	JA	CSC
	JA	ARG+3
CSC,	FSTA	SH		/SINH(Y)
	EXTERN	COSH
	JSR	COSH
	JA	CSD
	JA	ARG+3
CSD,	FSTA	CH		/COSH(Y)
/XR0 IS 0 FOR CSIN AND 1 FOR CCOS
	JXN	CALCOS,0	
	FLDA	S
	FMUL	CH
	FSTA	ARG		/SIN*COSH
	FLDA	C
CSE,	FMUL	SH
	FSTA	ARG+3		/COS*SINH
	STARTE
	FLDA	ARG
	FSTA	#CAC
	JA	RT
	EXTERN	#CAC
/DO COS
/
CALCOS,	FLDA	C
	FMUL	CH
	FSTA	ARG
	FLDA	S
	FNEG
	JA	CSE
	ENTRY 	CCOS
CCOS,	SETX	XR
	LDX	1,0
	JA	COM
