/
/
/	S  I  N  H
/	-  -  -  -
/
/SUBROUTINE SINH(X)
/
/ VERSION 5A 4-27-77  PT
/
	SECT	SINH
	JA	#SINH
	TEXT	+SINH  +
SINHXR,	SETX	XRSINH
	SETB	BPSINH
BPSINH,	FNOP
	0
	0
XRSINH,	F 0.0
SINH6,	F 0.0
SINH7,	F 0.0
SINH8,	F 0.0
F1SINH,	F 1.
F2SINH,	F 2.
	ORG	10*3+BPSINH
	FNOP
	JA	SINHXR
	0
SNHRTN,	JA	.
/
SINHLG,	0
	2613
	4412
/
SINH1,	F .1
/
SINH2,	F 87.929
/
SINH3,	F 6.
/
SINH4,	F 120.
	BASE	0
#SINH,	STARTD
	FLDA	10*3
	FSTA	SNHRTN
	FLDA	0
	SETX	XRSINH
	SETB	BPSINH
	BASE	BPSINH
	LDX	1,1
	FSTA	BPSINH
	FLDA%	BPSINH,1	/ADDR OF X
	FSTA	BPSINH
	STARTF
	FLDA%	BPSINH	/GET X
	FSTA	SINH8		/SAVE THE ARGUMENT.
	JGE	.+3		/MAKE IT POSITIVE.
	FNEG
	FSTA	SINH7		/AND SAVE ABS VALUE IN CASE WE NEED IT.
	FSUB	SINH1		/IS IT LESS THEN .1?
	JLE	SINHSR		/YES. USE SERIES APPROXIMATION.
	FSUB	SINH2		/IS IT GREATER THEN 88.029?
	JGE	SINHAP		/YES. USE LOG(2) APPROXIMATION.
	EXTERN	EXP
	JSR	EXP		/EXP(X)
	JA	.+4
	JA	SINH8
	FSTA	SINH7
	FLDA	F1SINH
	FDIV	SINH7		/1/EXP(X)
	FNEG			/-1/EXP(X)
	FADD	SINH7		/EXP(X)-1/EXP(X)
	FDIV	F2SINH		/ 1/2(EXP(X)-1/EXP(X))
	JA	SNHRTN		/AND RETURN NOW.
/
/
SINHAP,	FLDA	SINH7		/RECALL ABSOULTE VALUE.
	FSUB	SINHLG		/ABS(X)-LN(2)
	FSTA	SINH7		/EXP(ABS(X)-LN(2))
	EXTERN	EXP
	JSR	EXP
	JA	.+4
	JA	SINH7
	FSTA	SINH7
	FLDA	SINH8		/GET SIGN OF ARGUMENT.
	JGE	SPLR		/LOAD POSITIVE IF ARG WAS POSITIVE.
	FLDA	SINH7
	FNEG			/ELSE NEGATE IT.
	JA	SNHRTN		/AND RETURN.
SPLR,	FLDA	SINH7
	JA	SNHRTN
/
/
SINHSR,	FLDA	SINH8		/X  SERIES IF X<.1
	FMUL	SINH8		/X^2
	FSTA	SINH7		/X^2
	FMUL	SINH8		/X^3
	FSTA	SINH6		/X^3
	FMULM	SINH7		/X^5
	FDIV	SINH3		/X^3/6
	FADDM	SINH8		/X+X^3/6
	FLDA	SINH7		/X^5
	FDIV	SINH4		/X^5/120
	FADD	SINH8		/X+X^3/6+X^5/120
	JA	SNHRTN		/VOILA. WE ARE DONE.
