144
4
4 Instructions4.4.5 Exponent Operations
◆
Operands
Operand
Bit Element Word Element
System·User System·User Bit Designation Indexed Address Constant
Real
Number
S X Y M T C S SM D R T C SD KnX KnY KnM KnS KnSM
V,Z
Modication K H E
D X Y M T C S SM D R T C SD KnX KnY KnM KnS KnSM
V,Z
Modication K H E
Note: The elements in gray background are supported.
◆
Function
The natural logarithm of a binary oating-point number is calculated. The base is the mathematical constant
e (approximately equal to 2.71828).
Note: The value in S must be positive. If it is 0 or negative, an operation error will occur. The error code is
K6706 and stored in D8067. The error ag M8067 is set to ON to identify this error.
Example:
X0
ǒDLOGE D0 D2Ǔ
S D
X1
When X0 = ON, the natural logarithm of the binary floating-point
number in (D1, D0) is calculated. The base is the mathematical
constant e.
ǒDLOGEP D10 D12Ǔ
e
(D1ǃD0)
(D3ǃD2)
log
The formula for converting the natural logarithm to common logarithm is as follows (0.4342945 used for
common logarithm division):
LOG: Binary oating-point logarithm operation with a base of 10
◆
Overview
The LOG instruction calculates the common logarithm of a binary oating-point number with a base of 10.
LOG S1 D
Binary oating-point
logarithm operation with
a base of 10
Applicable model:
H3U
S1
Data
source
Binary oating-point variable whose common logarithm is
to be calculated
32-bit instruction
(9 steps)
DLOG:
Continuous
execution
DLOGP: Pulse
execution
D1
Operation
result
Unit that stores the calculated common logarithm