EasyManua.ls Logo

Freescale Semiconductor MC68881 - Page 162

Default Icon
409 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
4
FSINCOS Simultaneous Sine and Cosine FSINCOS
Operation:
Sine of Source $ FPs
Cosine of Source z) FPc
Assembler
Syntax:
FSINCOS.<fmt> <ea>,FPc:FPs
FSINCOS.X FPm,FPc:FPs
Attributes:
Format = (Byte, Word, Long, Single, Double, Extended, Packed)
Description:
Converts the source operand to extended precision (if necessary) and cal-
culates both the sine and the cosine of that number. Calculates both functions si-
multaneously; thus, this instruction is significantly faster than performing separate
FSIN and FCOS instructions. Loads the sine result into the destination floating-point
data register, FPs, and the cosine result into the destination floating-point data register
FPc. Sets the condition code bits according to the sine result, if FPs and FPc are specified
to be the same register, the cosine result is first loaded into the register and then is
overwritten with the sine result. This function is not defined for source operands of
( ± )infinity.
If the source operand is not in the range of (-2~r... +2~r], the argument is reduced
to within that range before the sine and cosine are calculated. However, large argu-
ments may lose accuracy during reduction, and very large arguments (greater than
approximately 10 2°) lose all accuracy. The results are in the range of [-1 ... + 1].
Operation Table:
•'•
Source In
Range
Destination
~ + ,
FPs Sine
Zero
+
+0.0 -0.0
Infinity
+
NAN 1
FPc Cosine + 1.0 NAN 1
NOTES:
1. Sets the OPERR bit in ttle FPSR exception byte.
2. If the source operand is a NAN, refer to 4.5.4 NANs for more information.
Status Register:
Condition Codes:
Affected as described in 4.5.5.1 SETTING FLOATING-POINT
CONDITION CODES (for the sine result)
Quotient Byte: Not affected
Exception Byte: BSUN
SNAN
OPERR.
OVFL
UNFL
DZ
INEX2
Cleared
Refer to 4.5.4 NANs.
Set if the source is (±)infinity; cleared other-
wise
Cleared
Set if a sine underflow occurs, in which case
the cosine result is 1. Cosine cannot underflow.
Refer to 6.1.5 Underflow.
Cleared
Refer to 6.1.7 Inexact Result.
FREESCALE
4-104
MC68881/MC68882 USER'S MANUAL

Table of Contents