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 |
|---|---|---|
|
|
The exponent. |
Outputs
Name |
Type |
Description |
|---|---|---|
Return value |
|
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¶
References¶
IEC 61131-3 §2.5.1.5.2