Update copyright dates with scripts/update-copyrights.
[glibc.git] / sysdeps / i386 / fpu / e_acosl.c
blobab0893192490923b471a83733474b2f89c5ee323
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) (1+x)) / x) */
16 asm ( "fld %%st\n"
17 "fld1\n"
18 "fsubp\n"
19 "fld1\n"
20 "fadd %%st(2)\n"
21 "fmulp\n" /* 1 - x^2 */
22 "fsqrt\n" /* sqrtl (1 - x^2) */
23 "fabs\n"
24 "fxch %%st(1)\n"
25 "fpatan"
26 : "=t" (res) : "0" (x) : "st(1)");
27 return res;
29 strong_alias (__ieee754_acosl, __acosl_finite)