/
/
/	E  X  P
/	-  -  -
/
/SUBROUTINE	EXP(X)
/
/ VERSION 5A 4-27-77  PT
/
	SECT	EXP
	JA	#EXP
	0
EXPFUD,	0
	0
	0
/
	EXTERN	#ARGER
EXPER,	TRAP4	#ARGER
	TEXT	+EXP   +
EXPXR,	SETX	XREXP
	SETB	BPEXP
BPEXP,	F 0.0
XREXP,	F 0.0
EXP1,	F 0.0
EXP2,	F 0.0
EXP33,	F 0.0
EXP4,	F 0.0
F1EXP,	F	1.
F2EXP,	F	2.
	ORG	10*3+BPEXP
	FNOP
	JA	EXPXR
	0
EXPRTN,	JA	.
/
EXPAF,	4
	2372
	1402
/
EXPBF,	7774
	2157
	5157
/
EXPCF,	12
	5454
	343
/
EXPDF,	7
	2566
	5341
/
EXP2E,	1
	2705
	2435
	BASE	0
#EXP,	STARTD
	FLDA	10*3
	FSTA	EXPRTN
	FLDA	0
	SETX	XREXP
	SETB	BPEXP
	BASE	BPEXP
	LDX	1,1	
	FSTA	BPEXP
	FLDA%	BPEXP,1	/ADDR OF X
	FSTA	BPEXP
	STARTF
	FLDA%	BPEXP	/GET X
	LDX	-1,0		/PRESERVE SIGN.
	JGE	.+5
	FNEG			/IF NEGATIVE NEGATE IT.
	LDX	0,0		/AND REMEMBER IT,BUBBY.
	FMUL	EXP2E		/MULTIPLY TO BINARY TYPE.
	FSTA	EXP1		/AND SAVE IT AWAY.
	JAL	EXPER		/CAN T FIX IT, ERROR.
	ALN	0		/FIX IT UP.
	FSTA	EXP33		/AND SAVE IT.
	FNORM			/NOW NORMALIZE FOR OUR COMPUTATIONS.
	FNEG			/NEGATE THE FAC
	FADD	EXP1		/ADD IN BEFORE NORMAL.
	FSTA	EXP1		/AND STORE BACK. NO FADDM
	FMUL	EXP1		/NOW SQUARE IT.
	FSTA	EXP2		/AND SAVE IT.
	FADD	EXPDF		/START THE ITERATION.
	FSTA	EXP4		/SAVE IN ANOTHER TEMP.
	FLDA	EXPCF		/NEXT CONSTANT.
	FDIV	EXP4		/AND DIVIDE INTO IT.
	FSUB	EXP1		/SUBTRACT BACK NOW.
	FADD	EXPAF		/NEXT CONSTANT.
	FSTA	EXP4		/AND SAVE AGAIN. KEEP THIS UP.
	FLDA	EXPBF
	FMUL	EXP2
	FADDM	EXP4
	FLDA	EXP1
	FDIV	EXP4
	FMUL	F2EXP
	FADD	F1EXP
	FSTA	EXPFUD		/NOW FIDDLE THE EXPONENT.
	STARTD
	FLDA	EXP33
	FADDM	EXPFUD-1	/EXPONENT UPDATE.
	STARTF
	JXN	EXPP,0		/NO INVERSION NECESSARY. RETURN.
	FLDA	F1EXP		/INVERT IT
	FDIV	EXPFUD
	JA	EXPRTN
EXPP,	FLDA	EXPFUD		/AN EXIT.
	JA	EXPRTN
