Annotation of coherent/b/lib/libm/i8087/acos87.m, revision 1.1

1.1     ! root        1: //////////
        !             2: / libm 8087
        !             3: / acos(d)
        !             4: //////////
        !             5: 
        !             6: #include "larges.h"
        !             7: #include "ifno8087.h"
        !             8: 
        !             9:        .globl  acos_
        !            10:        .globl  asin
        !            11:        .globl  cfcc87
        !            12:        .globl  edomain
        !            13: 
        !            14: //////////
        !            15: / double
        !            16: / acos(d)
        !            17: / double d;
        !            18: //////////
        !            19: 
        !            20: d      =       RASIZE          / arg offset
        !            21: 
        !            22: acos_:
        !            23:        ifno8087(_acos_)
        !            24:        mov     bx, sp
        !            25:        fdld    Pss d(bx)       / Load argument d.
        !            26: 
        !            27:        fld     st              / d, d
        !            28:        fabs                    / abs(d), d
        !            29:        fld1                    / 1, abs(d), d
        !            30:        fcompp                  / Compare 1 to abs(d) and pop twice.
        !            31:        Gcall   cfcc87
        !            32:        jae     0f
        !            33:        Gjmp    edomain         / d < -1 or 1 < d, issue EDOM error.
        !            34: 0:
        !            35:        Gcall   asin            / asin(d)
        !            36:        fild    cs:minus1       / -1, asin(d)
        !            37:        fldpi                   / pi, -1, asin(d)
        !            38:        fscale                  / pi/2, -1, asin(d)
        !            39:        fstp    st1             / pi/2, asin(d)
        !            40:        fsubr                   / acos(d) = pi/2 - asin(d)
        !            41:        Gret
        !            42: 
        !            43: / Data.
        !            44: minus1:        .word   -1
        !            45: 
        !            46: / end of acos87.m

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.