acos.s fix: use the formula acos(x) = atan2(sqrt(1-x),sqrt(1+x))
[musl] / src / math / i386 / acos.s
index 4f0168f..bfff0c5 100644 (file)
@@ -18,12 +18,10 @@ acos:
        fld %st(1)
        fld1
        fsubp
+       fsqrt
        fxch %st(2)
        faddp
-       fdivp
        fsqrt
-       fld1
-       fxch %st(1)
        fpatan
        fld1
        fld1