11 - 136 11 - 136
MELSEC-Q
11 INSTRUCTIONS AND FUNCTIONS
LOG
Function
LOGarithm
• Returns a natural logarithm value.
LOG ( <numeric expression> )
Syntax
numeric expression
• • • •
Specify the value of which natural logarithm is
obtained.
Examples
A=LOG(10)
• • • •
Stores the natural logarithm of 10 to A.
Description
• The LOG function obtains the natural logarithm of the value specified by a numeric
expression.
• The computation is performed in single-precision.
• To determine a common logarithm log10X with 10 as the base, define by using log10X =
logeX/loge10.
Program Example
10 ' Obtains LOGe 100
20 A=100
30 B=LOG(A)
:
' Obtains LOGe 100
40 PRINT "LOGe 100 =";B
50 END
RUN
LOGe 100 = 4.60517
OK
REMARK
See the EXP function.