2-183
2 Instruction Descriptions
NJ-series Instructions Reference Manual (W502)
Math Instructions
2
LN and LOG
These instructions find the logarithm of a real number.
z LN
The LN instruction finds the natural logarithm (logarithm to base e, where e = 2.718282).
z LOG
The LOG instruction finds the base-10 logarithm.
The following example for the LOG instruction is for when In is REAL#1000.0. The value of variable
abc will be REAL#3.0.
Function
0
1
1
2.718282
In
Out
0
1
1
10
In
Out
abc:=LOG(REAL#1000.0);
LD ST
abc
REAL#1000.0
LOG
EN ENO
In