Publication 1747-RM001G-EN-P - November 2008
4-32 Math Instructions
Sine (SIN)
Use the SIN instruction to take the sine of a number (source in radians) and
store the result in the destination. The source must be greater than or equal to
-205887.4 and less than or equal to 205887.4. The greatest accuracy is achieved
when the source is greater than -2 Pi and less than 2 Pi, where Pi = 3.141592.
The resulting value in the destination is always greater than or equal to -1 and
less than or equal to 1. Use this instruction with SLC 5/03 (OS302), SLC 5/04
(OS401), and SLC 5/05 processors.
Updates to Arithmetic Status Bits
The arithmetic status bits are found in Word 0, bits 0 to 3 in the status file.
After an instruction is executed, the arithmetic status bits in the status file are
updated.
Tangent (TAN)
Use the TAN instruction to take the tangent of a number (source in radians)
and store the result in the destination. The value in the source must be greater
than or equal to -102943.7 and less than or equal to 102943.7. The greatest
accuracy is achieved when the source is greater than -2 Pi and less than 2 Pi,
where Pi = 3.141592. The resulting value in the destination is either a real
number or infinity. Use this instruction with SLC 5/03 (OS302), SLC 5/04
(OS401), and SLC 5/05 processors.
Updates to Arithmetic Status Bits
The arithmetic status bits are found in Word 0, bits 0 to 3 in the status file.
After an instruction is executed, the arithmetic status bits in the status file are
updated.
SIN
Sine
Source N7:49
0<
Dest N7:50
0<
SIN
Output Instruction
Fixed SLC
5/01
SLC
5/02
SLC
5/03
SLC
5/04
SLC
5/05
•••
Table 4.23 Processor Function
With this Bit The Processor
S:0/0 Carry (C) always resets.
S:0/1 Overflow (V) sets if an overflow is generated or an unsupported input is
detected; otherwise resets.
S:0/2 Zero (Z) sets if the result is zero; otherwise resets.
S:0/3 Sign (S) sets if the result is negative; otherwise resets.
TAN
Tangent
Source N7:51
0<
Dest N7:52
0<
TAN
Output Instruction
Fixed SLC
5/01
SLC
5/02
SLC
5/03
SLC
5/04
SLC
5/05
•••
Table 4.24 Processor Function
With this Bit The Processor
S:0/0 Carry (C) always resets.
S:0/1 Overflow (V) sets if an overflow is generated or an unsupported input is
detected; otherwise resets.
S:0/2 Zero (Z) sets if the result is zero; otherwise resets.
S:0/3 Sign (S) sets if the result is negative; otherwise resets.