Tue Apr 23 15:56:56 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
[glibc.git] / sysdeps / libm-i387 / e_acos.S
blob6ec778536312fd16cc7fc55cf004caa0d5179999
1 /*
2  * Written by J.T. Conklin <jtc@netbsd.org>.
3  * Public domain.
4  */
6 #include <machine/asm.h>
8 RCSID("$NetBSD: e_acos.S,v 1.4 1995/05/08 23:44:37 jtc Exp $")
10 /* acos = atan (sqrt(1 - x^2) / x) */
11 ENTRY(__ieee754_acos)
12         fldl    4(%esp)                 /* x */
13         fst     %st(1)
14         fmul    %st(0)                  /* x^2 */
15         fld1                            
16         fsubp                           /* 1 - x^2 */
17         fsqrt                           /* sqrt (1 - x^2) */
18         fxch    %st(1)
19         fpatan
20         ret