diff options
author | Joseph Myers <joseph@codesourcery.com> | 2012-04-30 18:56:39 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2012-04-30 18:56:39 +0000 |
commit | adfbc8ac9e192b6e3007f7a47852df937afa2145 (patch) | |
tree | 09a345d547258a55e1d410065f9ca09a1bed480c /sysdeps/i386/fpu/e_asin.S | |
parent | 5ba3cc691c856e5c67a7d4cd4713f20a79f7ba81 (diff) | |
download | glibc-adfbc8ac9e192b6e3007f7a47852df937afa2145.tar glibc-adfbc8ac9e192b6e3007f7a47852df937afa2145.tar.gz glibc-adfbc8ac9e192b6e3007f7a47852df937afa2145.tar.bz2 glibc-adfbc8ac9e192b6e3007f7a47852df937afa2145.zip |
Fix x86 acos near 1 (bug 13942).
Diffstat (limited to 'sysdeps/i386/fpu/e_asin.S')
-rw-r--r-- | sysdeps/i386/fpu/e_asin.S | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sysdeps/i386/fpu/e_asin.S b/sysdeps/i386/fpu/e_asin.S index a17e922b6d..9a44cb62ac 100644 --- a/sysdeps/i386/fpu/e_asin.S +++ b/sysdeps/i386/fpu/e_asin.S @@ -7,13 +7,15 @@ RCSID("$NetBSD: e_asin.S,v 1.4 1995/05/08 23:45:40 jtc Exp $") -/* asin = atan (x / sqrt(1 - x^2)) */ +/* asin = atan (x / sqrt((1-x) (1+x))) */ ENTRY(__ieee754_asin) fldl 4(%esp) /* x */ fld %st - fmul %st(0) /* x^2 */ - fld1 - fsubp /* 1 - x^2 */ + fld1 /* 1 : x : x */ + fsubp /* 1 - x : x */ + fld1 /* 1 : 1 - x : x */ + fadd %st(2) /* 1 + x : 1 - x : x */ + fmulp /* 1 - x^2 */ fsqrt /* sqrt (1 - x^2) */ fpatan ret |