![background image](http://html1.mh-extra.com/html/omron/sysmac-cs1d-cpu/sysmac-cs1d-cpu_reference-manual_742268674.webp)
635
Floating-point Math Instructions
Section 3-15
Description
LOG(468) calculates the natural (base e) logarithm of the 32-bit floating-point
number in S+1 and S and places the result in R+1 and R.
The source data must be positive; if it is negative, an error will occur and the
instruction will not be executed.
If the absolute value of the result is greater than the maximum value that can
be expressed as floating-point data, the Overflow Flag will turn ON and the
result will be output as
±∞
.
Note
The constant e is 2.718282.
The following diagram shows the relationship between the input data and
result.
Flags
Precautions
The source data in S+1 and S must be in IEEE754 floating-point data format.
R+1
R
S
S+1
Source (32-bit floating-point data)
Result (32-bit floating-point data)
log
e
R
S: Input data
R: Result
Name
Label
Operation
Error Flag
ER
ON if the source data is not recognized as floating-point
data.
ON if the source data is negative.
ON if the source data is not a number (NaN).
OFF in all other cases.
Equals Flag
=
ON if both the exponent and mantissa of the result are 0.
OFF in all other cases.
Overflow Flag
OF
ON if the absolute value of the result is too large to be
expressed as a 32-bit floating-point value.
Underflow Flag
UF
OFF
Negative Flag
N
ON if the result is negative.
OFF in all other cases.
Summary of Contents for SYSMAC CS1D-CPU**
Page 3: ...iv...
Page 29: ...xxx...
Page 185: ...146 List of Instructions by Function Code Section 2 4...
Page 1389: ...1350 CJ series Instruction Execution Times and Number of Steps Section 4 2...
Page 1390: ...1351 Appendix A ASCII Code Table ASCII SP Four leftmost bits Four rightmost bits...
Page 1391: ...1352 ASCII Code Table Appendix A...