fptan
Partial Tangent
Computes tangent of ST(0) and pushes 1.0.
Pseudocode Operation
temp ← ST(0); ST(0) ← tan(temp); push(1.0); TOS ← TOS + 1
Encoding
Operands
Related
More in x87 FPU
Reference
Instruction Forms
| Opcode | Instruction | Op/En | 64/32-bit Mode | CPUID | Description |
|---|---|---|---|---|---|
| D9 F2 | FPTAN | Valid Valid | Replace ST(0) with its approximate tangent and push 1 onto the FPU stack. |
Description
Computes the approximate tangent of the source operand in register ST(0), stores the result in ST(0), and pushes a 1.0 onto the FPU register stack. The source operand must be given in radians and must be less than ±263. The following table shows the unmasked results obtained when computing the partial tangent of various classes of numbers, assuming that underflow does not occur. Table 3-35. FPTAN Results
ST(0) SRC ST(0) DEST
- ∞ *
- F - F to + F - 0 - 0 + 0 + 0 + F - F to + F
+ ∞ * NaN NaN
Operation
IF ST(0) < 263 THEN C2 := 0; ST(0) := fptan(ST(0)); // approximation of tan TOP := TOP - 1; ST(0) := 1.0; ELSE (* Source operand is out-of-range *) C2 := 1; FI;