home *** CD-ROM | disk | FTP | other *** search
- / sin.s (emx+gcc) -- Copyright (c) 1992-1993 by Steffen Haecker
-
- #include <libm.h>
-
- .globl _sin
-
- .text
-
- .align 2, 0x90
-
- / double sin (double x)
- /
- / |x| >= 2^63 results in #NAN; errno is set to EDOM
- /
-
- #define x 4(%esp)
-
- _sin:
- fldl x / x
- fsin / sin(x)
- fstsww %ax
- testb $0x04, %ah
- jnz 1f / C2 != 0 ?
- ret
-
- 1: fldl __const_NAN / #NAN
- fstp %st(1)
- SETERRNO($EDOM)
- ret
-