EXP

Returns the natural exponential of a numeric input.

Signature

    ┌─────────┐
IN ─┤   EXP   ├─ OUT
    └─────────┘
FUNCTION EXP : ANY_REAL
  VAR_INPUT
    IN : ANY_REAL;
  END_VAR
END_FUNCTION

The return type matches the input type. EXP accepts REAL, LREAL.

Inputs

Name

Type

Description

IN

ANY_REAL

The exponent.

Outputs

Name

Type

Description

Return value

ANY_REAL

e raised to the power of IN. Same type as IN.

Description

Returns e raised to the power of IN, where e is Euler’s number (approximately 2.71828). This is the inverse of the LN function.

Example

result := EXP(REAL#1.0);   (* result ~ 2.718282 *)
value := EXP(LREAL#0.0);   (* value = 1.0 *)

See Also

  • LN — natural logarithm

  • EXPT — exponentiation

References