/ asin.s (emx+gcc) -- Copyright (c) 1991-1993 by Eberhard Mattes

#include <libm.h>

        .globl  FUN(asin)

        .text

        .align  2, 0x90

/ double asin (double x)

/ asin(x) = atan (x / sqrt (1-x*x))

#define x       4(%esp)

DEF(asin)
        FLD     x                       / x
        fld     %st
        fld     %st
        fmulp
        fsubrl  __const_ONE
        fsqrt
        fdivrp
        fldl    __const_ONE
        fpatan
        _xam
        j_nan   1f
        ret

        .align  2, 0x90
1:      SETERRNO($EDOM)
        ret
