3. Instructions
Ladder Program for the Double-precision Calculation
0.00
Comparison of the Calculation Results
When the real-number results are compared, it is clear that the double-precision calculation yields a
more accurate result.
512
1. This program section converts the BCD data to dou-
1.
BIN
ble-precision floating-point data (64 bits, IEEE754-for-
D0
D100
mat).
BIN
• The BIN(023) instructions convert the BCD data to
D1000
D1000
DBL
D100
• The floating-point data for the angle
D200
DBL
• RADD(849) converts the angle data in words D200
D1000
D1200
RADD
• The floating-point data for the radius r is output to
D200
D200
2. This program section calculates the sin
2.
COSD
D200
D300
• The value for cos
SIND
D200
• The value for sin
D400
3.
*D
3. This program section calculates x (r
D1200
sin ).
D300
D10000
• The value for x (r
*D
D1200
• The value for y (r
D400
D20000
Coordinate
END
binary and the DBL(843) instructions convert the
binary data to double-precision floating-point data.
D200 and D203.
and D203 to radians.
words D1200 and D1203.
as double-precision floating-point values.
is output to words D300 and
D303.
is output to words D400 and
D403.
cos
D10000 and D10003.
sin ) is output to D20000 and
D20003.
Floating-point number
x
4022 CB39 E973 5C32
y
400B 5C92 91AC 8EEB
CS/CJ/NSJ Series Instructions Reference Manual (W474)
is output to
and the cos
cos ) and y (r
) is output to words
Real number
3.4202014332567
9.3969262078591
Need help?
Do you have a question about the CJ - INSTRUCTIONS REFERENCE MANUAL 07-2009 and is the answer not in the manual?
Questions and answers