529
Double-precision Floating-point Instructions Section 3-15
Comparing Single-
precision and Double-
precision
Calculations
This example shows the differences in between single-precision and double-
precision calculations when the following vector expressed in polar coordi-
nates is converted to rectangular coordinates A (x,y).
In this example, the 4-digit BCD angle (
θ, in degrees) is read from D0 and the
4-digit BCD distance (r) is read from D1000.
r = re
j
θ
360
π
Y
0
r
θ
X
r
A (x, y) = A (rcos θ,rsin θ)
0.00
BIN
D0
D100
BIN
D1000
D1000
SIN
D200
D400
COS
D200
D300
END
*F
D1200
D300
D10000
*F
D1200
D400
D20000
FLT
D100
D200
FLT
D1000
D1200
RAD
D200
D200
0.00
BIN
D0
D100
BIN
D1000
D1000
SIND
D200
D400
COSD
D200
D300
END
*D
D1200
D300
D10000
*D
D1200
D400
D20000
DBL
D100
D200
DBL
D1000
D1200
RADD
D200
D200
• Ladder Program for the
Single-precision Calculation
• Ladder Program for the
Double-precision Calculation