EXP
Description
The EXP function is used to calculate the e
power of the expression expr
, which is the natural exponential function. e
is a mathematical constant, approximately equal to 2.71828.
Parameter Description
expr
: The value for which the exponent needs to be calculated, of type double precision floating point (double).
Return Result
The return type is double precision floating point (double), representing the calculation result.
Example
- Calculate the 1st power of
e
:
- Calculate
e
to the power of 2:
- Simulate continuous compound interest calculation, assuming the principal is 1000 yuan, the annual interest rate is 5%, and the deposit is for 3 years:
Notes
- When
expr
is negative, the EXP function returns a positive number less than 1. - When
expr
is 0, the EXP function returns 1. - When
expr
is positive infinity, the EXP function returns positive infinity. - When
expr
is negative infinity, the EXP function returns 0.