485
3. Instructions
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Floating-point Math Instructions
3
SIN/COS/TAN
Function
z SIN
SIN(460) calculates the sine of the angle (in radians) expressed as a 32-bit floating-point value in S+1
and S and places the result in R+1 and R.
(The floating point source data must be in IEEE754 format.)
Specify the desired angle (–65,535 to 65,535) in radians in S+1 and S.
For information on converting from degrees to radians, see 3-15-22 LOGARITHM: LOG(468)
DEGREES TO RADIANS: RAD(458).
The following diagram shows the relationship between the angle and result.
z COS
COS(461) calculates the cosine of the angle (in radians) expressed as a 32-bit floating-point value in
S+1 and S and places the result in R+1 and R.
(The floating point source data must be in IEEE754 format.)
Specify the desired angle (-65,535 to 65,535) in radians in S+1 and S.
For information on converting from degrees to radians, see 3-15-22 LOGARITHM: LOG(468)
DEGREES TO RADIANS: RAD(458).
The following diagram shows the relationship between the angle and result.
R+1 R
S
S+1
SIN
Source (32-bit floating-point data)
Result (32-bit floating-point data)
R S: Angle (radian) data
R: Result (sine)
R+1 R
S
S+1
COS
Source (32-bit floating-point data)
Result (32-bit floating-point data)
R
S: Angle (radian) data
R: Result (cosine)