وو

وحید آنلاین . آرشیو وبلاگ وحیدمی دات آی آر . شرکت بیان. vahidmy.blog.ir

وو

وحید آنلاین . آرشیو وبلاگ وحیدمی دات آی آر . شرکت بیان. vahidmy.blog.ir

FPTAN

FPTAN 

Usage: FPTAN                                         Modifies flags: See below.

Computes the tangent of the 'src' 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 ±2**63 . 

Arctangent and Tangent


FPATAN                        ; D9 F3                [8086,FPU]

FPTAN                         ; D9 F2                [8086,FPU]


FPATAN computes the arctangent, in radians, of the result of dividing ST1 by ST0, stores the result in ST1, and pops the register stack. It works like the C atan2 function, in that changing the sign of both ST0 and ST1 changes the output value by pi (so it performs true rectangular-to-polar coordinate conversion, with ST1 being the Y coordinate and ST0 being the X coordinate, not merely an arctangent).


FPTAN computes the tangent of the value in ST0 (in radians), and stores the result back into ST0.


The absolute value of ST0 must be less than 2**63.


FPU Flags Affected

C1 Set to 0 if stack underflow occurred; set to 1 if stack overflow occurred.

Set if result was rounded up; cleared otherwise.

C2 Set to 1 if outside range (-2 63 <source operand <+2 63 ); otherwise, set to 0.

C0, C3 Undefined.


The following table shows the unmasked results obtained when computing the partial tangent of various classes of numbers, assuming that underflow does not occur.

       FPTAN Results

ST(0) SRC ST(0) DEST

         -8               *

         -F           -F to +F

         -0              -0

         +0              +0

         +F          -F to +F

        +8                *

       NaN             NaN


EXAMPLE:

fptan Label