/
/
/	T  A  N
/	-  -  -
/
/SUBROUTINE 	TAN(X)
/
/ VERSION 5A 4-27-77  PT
/
	SECT	TAN
	JA	#TAN
	EXTERN	#ARGER
TANER,	TRAP4	#ARGER
	TEXT	+TAN   +
TANXR,	SETX	XRTAN
	SETB	BPTAN
BPTAN,	FNOP
	0
	0
XRTAN,	F 0.0
TAN1,	F 0.0
TAN2,	F 0.0
	ORG	10*3+BPTAN
	FNOP
	JA	TANXR
	0
TANRTN,	JA	.
	BASE	0
#TAN,	STARTD
	FLDA	10*3
	FSTA	TANRTN
	FLDA	0
	SETX	XRTAN
	SETB	BPTAN
	BASE	BPTAN
	LDX	1,1
	FSTA	BPTAN
	FLDA%	BPTAN,1	/ADDR OF X
	FSTA	BPTAN
	STARTF
	FLDA%	BPTAN	/GET X
	JEQ	TANRTN	/IF 0 RTN NOW
	FSTA	TAN1	/SAVE FOR A SECOND
	EXTERN	COS
	JSR	COS	/TAKE COS(X)
	JA	.+4
	JA	TAN1
	JEQ	TANER	/COS=0. A NO-NO
	FSTA	TAN2	/SAV IT
	EXTERN	SIN
	JSR	SIN	/NOW TAKE SIN(X)
	JA	.+4
	JA	TAN1
	FDIV	TAN2	/DIV BY COS(X)
	JA	TANRTN
