HTBasic Help
×
Menu
Index

EXP

Returns "e" raised to a power.
 
 EXP (numeric-expression)
 
Usage:
X1=EXP(Y*10)
X2=EXP(-Y^3)
 
Example:           EXP.BAS
 
Description:
EXP returns the value of "e" raised to the power specified by the numeric expression. "e" is the base of the Naperian or Natural logarithm. Its value is approximately 2.718 281 828 459 05.
 
COMPLEX Arguments
EXP accepts either a COMPLEX or REAL argument and returns a value of the same type. For COMPLEX arguments the real and imaginary parts of EXP(Z) are calculated (using real arithmetic) as
 
REAL(EXP(Z)) = EXP(REAL(Z))*COS(IMAG(Z))
IMAG(EXP(Z)) = EXP(REAL(Z))*SIN(IMAG(Z))
 
IMAG(Z) specifies radians, regardless of the current trigonometric mode. Notice that intermediate values generated during the calculation of the function can cause over- or underflow errors for very large or small values of Z.
 
See Also: