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