EXP: Raising e to the Nth Power

How to:

The EXP function raises the value "e" (approximately 2.72) to a specified power. This function is the inverse of the LOG function, which returns the logarithm of the argument.

EXP calculates the result by adding terms of an infinite series. If a term adds less than .000001 percent to the sum, the function ends the calculation and returns the result as a double-precision number.


Top of page

x
Syntax: How to Raise e to the Nth Power
EXP(power, output)

where:

power

Numeric

Is the power to which "e" is raised.

output

Double-precision floating-point



Example: Raising e to the Nth Power

EXP raises "e" to the power designated by the &POW variable, specified here as 3. The result is then rounded to the nearest integer with the .5 rounding constant. The result has the format D15.3.

EXP(&POW, 'D15.3') + 0.5;

For 3, the result is APPROXIMATELY 20.


iWay Software