7-303
LOG10D(P)
1
2
3
4
6
6
7
8
7.12 Special function instructions
7.12.26 Common logarithm operation on floating-point data (Double precision) (LOG10D(P))
Operation Error
(1) In any of the following cases, an operation error occurs, the error flag (SM0) turns on, and an
error code is stored into SD0.
• The value specified by is negative. (Error code: 4100)
• The value specified by is 0. (Error code: 4100)
• The value of the specified device is not in the following range: (Error code: 4140)
0,2
-1022
| value of specified device | < 2
1024
• The value of the specified device is 0. (Error code: 4140)
• The value resulted from the operation is within the range shown below.
(When an overflow occurs): (Error code: 4141)
2
1024
| value of specified device |
Program Example
(1) This following program obtains the value for common logarithm of the 64-bit floating-point
data type real number specified by D600 to D603 when X10 is turned on. Then the program
stores the operation result into D123 to D126.
[Ladder Mode] [List Mode]
[Operation]
S
S
Step
Instruction
Device
D603 D602 D601 D600
Log10
2.806
D126 D125 D124 D123
0.448088