fsin
Sine
FSIN
Computes sine of ST(0) (in radians).
Details
Computes the sine of ST(0), where the argument is interpreted as an angle in radians. The result replaces ST(0); the x87 FPU status flags are updated. This transcendental instruction has high latency and may trigger a C2 flag if the argument is outside the acceptable range (roughly ±2^63).
Pseudocode Operation
ST(0) ← sin(ST(0))
Example
FSIN
Encoding
Binary Layout
D9
+0
FE
+1
Operands
Reference (Intel® SDM)
Instruction Forms
| Opcode | Instruction | Op/En | 64/32-bit Mode | CPUID | Description |
|---|---|---|---|---|---|
| D9 FE | FSIN | Valid Valid | Replace ST(0) with the approximate of its sine. |
Description
Computes an approximation of the sine of the source operand in register ST(0) and stores the result in ST(0). The source operand must be given in radians and must be within the range −263 to +263. The following table shows the results obtained when taking the sine of various classes of numbers, assuming that underflow does not occur.
Table 3-37. FSIN Results
SRC (ST(0)) DEST (ST(0))
− ∞ *
− F − 1 to + 1
− 0 −0
+ 0 + 0
+ F − 1 to +1
+ ∞ *
NaN NaN
Operation
IF -263 < ST(0) < 263 THEN C2 := 0; ST(0) := fsin(ST(0)); // approximation of the mathematical sin function ELSE (* Source operand out of range *) C2 := 1; FI;
Exceptions
Protected Mode Exceptions
#NM CR0.EM[bit 2] or CR0.TS[bit 3] = 1.
#MF If there is a pending x87 FPU exception.
#UD If the LOCK prefix is used.
Real-Address Mode Exceptions
Same exceptions as in protected mode.
Virtual-8086 Mode Exceptions
Same exceptions as in protected mode.
Compatibility Mode Exceptions
Same exceptions as in protected mode.
64-Bit Mode Exceptions
Same exceptions as in protected mode.
FSIN—Sine Vol. 2A 3-381