Mitsubishi Q00JCPU User Manual page 933

Hide thumbs Also See for Q00JCPU:
Table of Contents

Advertisement

APPENDICES
(b) Replacing a part of floating-point operation instructions with double-
precision floating-point operation instructions
Only operations require high accuracy are replaced with double-precision floating-
point operation instructions. Using the ECON and EDCON instructions, convert
floating-point data mutually between single precision and double-precision. The
flow of a replacement program is as follows:
• Data required for operations are converted from single precision to double
precision using the ECON instruction.
• Operations are performed in double precision using the double-precision
floating-point operation instructions.
• Operation results are converted from double precision to single precision
using the EDCON instruction.
A program example that floating-point data are converted mutually between single
precision and double precision before and after operations is shown below.
Example) Replacing the floating-point operation [A
1) Device assignment
Application
Data A
Data B
Data C
Operation
result
2) Program before replacement
Appendix 5 Method of replacing High Performance model QCPU with Universal model QCPU
ECON and EDCON instructions)
TableApp.76 Device assignment
Before replacement
Device
Data type
D0 to D1
D2 to D3
Floating-point
data (single
D4 to D5
precision)
D6 to D7
Figure App.22 Sample program
B+C] (Using the
After replacement
Application
Device
Data A
D0 to D1
Data B
D2 to D3
Floating-point
data (single
Data C
D4 to D5
precision)
Operation
D6 to D7
result
Data A (D)
D10 to D13
Data B (D)
D14 to D17
Floating-point
data (double
Data C (D)
D18 to D21
precision)
Operation
D22 to D25
result (D)
App
9
10
11
12
Data type
- 144

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents