X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fmath%2Fi386%2Facos.s;h=47f365efb1ea7493c34f7d64b7db33761e4337bd;hb=f4ded939bf90cd6baed6b4e723e54a62c9bdb6b9;hp=6f9ef7f0e37ada36bc53e9b37a3c1d234f528be6;hpb=bc33e617040166e971ec1e6822ac1cc417eb6c9c;p=musl diff --git a/src/math/i386/acos.s b/src/math/i386/acos.s index 6f9ef7f0..47f365ef 100644 --- a/src/math/i386/acos.s +++ b/src/math/i386/acos.s @@ -1,3 +1,5 @@ +# use acos(x) = atan2(fabs(sqrt((1-x)*(1+x))), x) + .global acosf .type acosf,@function acosf: @@ -15,10 +17,12 @@ acosl: acos: fldl 4(%esp) 1: fld %st(0) - fmul %st(0) fld1 - fsubp %st(1) + fsub %st(0),%st(1) + fadd %st(2) + fmulp fsqrt + fabs # fix sign of zero (matters in downward rounding mode) fxch %st(1) fpatan ret