/IMPROVED FEXP() FUNCTION  -JVZ

	FEXT=0000
FIXMRI	FGET=0000
FIXMRI	FADD=1000
FIXMRI	FDIV=3000
FIXMRI	FMUL=4000
FIXMRI	FPUT=6000
	FENT=4407

	FIELD 1
	WORDS=4
	T3=33
	EXP=44
	HORD=45
	M12=102
	FLARGP=125
	FLP5=351
	FLT1=2406
	TEMP=4646
	XSQR=5325
	RETURN=5536

	*175		/'TOP'
	FEXP-WORDS-2	/ADD A FEW MORE VARIABLES

	*367		/'FNTABF'+12
	FEXP		/NEW ENTRY POINT

	*4652
FEXP,	CLA CMA		/SET EXIT COUNTER
	DCA T3
	TAD EXP		/CHECK MAGNITUDE OF ARG.
	TAD M12
	SPA CLA		/CHECK FOR UNDERFLOW
	JMP XOK
	TAD HORD	/BUT ONLY IF NEGATIVE!
	SMA CLA
	JMP XOK
	DCA HORD	/SET UP ZERO RESULT
SQR,	FENT		/RESTORE PROPER VALUE
	FMUL EXP
	FEXT
	ISZ T3
	JMP SQR
	RETURN

XOK,	IAC CLL RTL	/(DOESN'T WORK ON A CLASSIC-8)
	TAD EXP
	SPA SNA		/IS MAGNITUDE < 2^-4?
	JMP .+5		/YES - LEAVE IT ALONE
	CMA		/NO  - SET EXIT COUNTER
	DCA T3
	TAD FOUR	/EFFECTIVELY DIVIDE BY 2^N
	DCA EXP		/SEE DECUS:FOCAL8-89
	FENT		/5TH ORDER SERIES APPROX.
	FPUT TEMP
	FMUL FIVE
	FADD FOUR
	FMUL TEMP
	FADD THREE
	FMUL TEMP
	FADD I TWO
	FMUL TEMP
	FADD I ONE
	FMUL TEMP
	FADD I ONE
	FEXT
	JMP SQR+3

THREE,	-2;2525;2525	/ALL BITS USED
FOUR,	-4;2525;2525	/ONLY 19 BITS NEEDED
FIVE,	-6;2104;FLT1	/ONLY 15 BITS NEEDED
TWO,	FLP5
ONE=TWO-1

/CHANGES TO THE ARCTANGENT ROUTINE
	FENT
	FGET I FLARGP
	FMUL I FLARGP
	FPUT I (XSQR

	*4740
	FMUL I (XSQR

	*4742
	FPUT TEMP

	*4744
	FMUL I (XSQR

	*4746
	FMUL I (XSQR

	*4750
	FMUL I FLARGP
	FDIV TEMP
	*5037
	FLT1

	*5156
	TEMP
	$
