2 * Written by J.T. Conklin <jtc@netbsd.org>.
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) (1+x)) / x) */
16 fld1 /* 1 : 1 - x : x */
17 fadd %st(2) /* 1 + x : 1 - x : x */
18 fmulp /* 1 - x^2 : x */
19 fsqrt /* sqrt (1 - x^2) : x */
21 fxch %st(1) /* x : sqrt (1 - x^2) */
22 fpatan /* atan (sqrt(1 - x^2) / x) */
25 strong_alias (__ieee754_acos, __acos_finite)