{{fbdoc item="title" value="EXP"}}----
Returns ##//e//## raised to the power of a given number

{{fbdoc item="syntax"}}##
	[[KeyPgDeclare declare]] [[KeyPgFunction function]] **Exp** [[KeyPgCdecl cdecl]] ( [[KeyPgByval byval]] //number// [[KeyPgAs as]] [[KeyPgDouble double]] ) [[KeyPgAs as]] [[KeyPgDouble double]]
##
{{fbdoc item="usage"}}##
	//result// = **Exp**( //number// )
##
{{fbdoc item="param"}}
	##//number//##
		The ##[[KeyPgDouble Double]]## ##//number//## that ##//e//## is raised to the power of.

{{fbdoc item="ret"}}
	Returns the [[KeyPgDouble Double]] value of ##//e//## raised to power of ##//number//##.

{{fbdoc item="desc"}}
	The mathematical constant ##//e//##, also called Euler's constant, is the base of the ##Exp## and ##[[KeyPgLog Log]]## and is an irrational and transcendental number. The value of ##//e//## to twenty significant figures is: ##2.7182818284590452354##. The required ##//number//## argument can be any valid numeric expression within range of the function. If ##//number//## is too large, ##**Exp**## returns infinity.  If ##//number//## is too small, ##**Exp**## returns zero (##0.0##).  If ##//number//## is zero, ##1.0## is returned. The exact limit on ##//number//## is based on the math processor.

{{fbdoc item="ex"}}
{{fbdoc item="filename" value="examples/manual/math/exp.bas"}}%%(freebasic)
'Compute Continuous Compound Interest
DIM r AS DOUBLE
DIM p AS DOUBLE
DIM t AS DOUBLE
DIM a AS DOUBLE

INPUT "Please enter the initial investment (principal amount): "; p
INPUT "Please enter the annual interest rate (as a decimal): "; r
INPUT "Please enter the number of years to invest: "; t

a = p * EXP ( r * t )
PRINT ""
PRINT "After";t;" years, at an interest rate of"; r * 100; "%, your initial investment of"; p; " would be worth";a
%%

The output would look like:
%%
Please enter the initial investment (principal amount): 100
Please enter the annual interest rate (As a decimal): .08
Please enter the number of years To invest: 20
After 20 years, at an interest rate of 8%, your initial investment of 100 would be worth 495.3032424395115
%%

{{fbdoc item="diff"}}
	- None

{{fbdoc item="see"}}
	- ##[[KeyPgLog Log]]##
	- ##[[KeyPgOpExponentiate Operator ^ (Exponentiate)]]##

{{fbdoc item="back" value="CatPgMath|Math"}}