home *** CD-ROM | disk | FTP | other *** search
- / acos.s (emx+gcc) -- Copyright (c) 1991-1993 by Eberhard Mattes
-
- #include <libm.h>
-
- .globl _acos
-
- .text
-
- .align 2, 0x90
-
- / double acos (double x)
-
- / acos(x) = atan2 (sqrt (1-x*x), x)
-
- #define x 4(%esp)
-
- _acos:
- fldl x / x
- fld %st
- fmulp
- fsubrl __const_ONE
- fsqrt
- fldl x / x
- fpatan
- _xam
- j_nan 1f
- ret
-
- .align 2, 0x90
- 1: SETERRNO($EDOM)
- ret
-