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^2) / x) */
14 fmul %st(0) /* x^2 : x */
15 fld1 /* 1 : x^2 : x */
16 fsubp /* 1 - x^2 : x */
17 fsqrt /* sqrt (1 - x^2) : x */
18 fxch %st(1) /* x : sqrt (1 - x^2) */
19 fpatan /* atan (sqrt(1 - x^2) / x) */