13.3
Calculating the Natural Logarithm
LN
These functions output the natural logarithm (logarithm with base e) of an input value.
Structured text
d:=LN(s);
Setting data
■Description, type, data type
Argument
s (IN)
d
Processing details
■Operation processing
• These functions calculate the natural logarithm of the REAL/LREAL data type value input to (s), and output the operation
result from (d).
• When the input value is defined as A and the output value is defined as B, the relationship of A and B will be as follows:
B=log
A
e
• Natural logarithm operation is performed with the base (e) defined as 2.71828.
■Operation result
The operation processing is performed. The operation result is output from (d).
Operation error
Error code
Description
3405H
The input value is 0 or negative.
13 SINGLE VARIABLE FUNCTIONS
168
13.3 Calculating the Natural Logarithm
Description
Input
Output
Type
Data type
Input variable
ANY_REAL
Output variable
ANY_REAL