## EXP: Raising "e" to the Nth Power

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 an argument's logarithm.

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.

*Syntax:* How to Raise "e" to the Nth Power

EXP(power, outfield)

where:

power

Numeric

Is the power that "e" is raised to.

outfield

Double-precision

Is the name of the field that contains the result, or the format of the output value enclosed in single quotation marks.

In Dialogue Manager, you must specify the format. In Maintain, you must specify the name of the field.

*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 and returned to the variable &RESULT. The format of the output value is D15.3.

‑SET &POW = '3';

‑SET &RESULT = EXP(&POW, 'D15.3') + 0.5;

-TYPE E TO THE &POW POWER IS APPROXIMATELY &RESULT

The output is:

E TO THE 3 POWER IS APPROXIMATELY 20