Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- iAPx86 - <b>fsin sine exceptions: p u d i s</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
FSIN            Sine                                 Exceptions: P U D I S
FSINCOS         Sine and cosine                      C3 C2 C1 C0: ? * * ?
                                                     FPU: 387+
FSIN
FSINCOS

                ; FSIN                  ; FSINCOS
        Logic   ST . sin(ST)            temp . ST
                                        ST . sin(temp)
                                        push (cos(temp))

    FSIN replaces the contents of ST with sin(ST).

    FSINCOS computes both sin(ST) and cos(ST). It replaces ST with the
    sine and then pushes the cosine onto the FPU stack (leaving the sine
    in ST(1) and the cosine in ST).

    ST, expressed in radians, must be an absolute number that is less
    than 2**63. If the operand is outside the acceptable range, FSIN/
    FSINCOS set C2 to 1 and no calculation is performed.


    Note
    The 80486 checks for interrupts while executing these instructions.
    It will abort FSIN/FSINCOS to service an interrupt.
    

    Opcode      Format
    D9 FE       FSIN
    D9 FB       FSINCOS


    Timing
    Variations    8087         287        387      486     Pentium
    fsin           -            -       122-771  257-354   16-126  NP
    fsincos        -            -       194-809  292-365   17-137  NP
     Additional cycles required if operand > pi/4 (~3.141/4 = ~.785)

See Also: FCOS CC

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson