Updated to fedora-glibc-20090427T1419
[glibc/history.git] / sysdeps / i386 / fpu / e_acosl.c
blob0c3e03945a43fad8feb60bc53806dfbd5ff8ef5b
1 /*
2 * Written by J.T. Conklin <jtc@netbsd.org>.
3 * Public domain.
5 * Adapted for `long double' by Ulrich Drepper <drepper@cygnus.com>.
6 */
8 #include <math_private.h>
10 long double
11 __ieee754_acosl (long double x)
13 long double res;
15 /* acosl = atanl (sqrtl(1 - x^2) / x) */
16 asm ( "fld %%st\n"
17 "fmul %%st(0)\n" /* x^2 */
18 "fld1\n"
19 "fsubp\n" /* 1 - x^2 */
20 "fsqrt\n" /* sqrtl (1 - x^2) */
21 "fxch %%st(1)\n"
22 "fpatan"
23 : "=t" (res) : "0" (x) : "st(1)");
24 return res;