projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
math: use '#pragma STDC FENV_ACCESS ON' when fenv is accessed
[musl]
/
src
/
math
/
i386
/
acos.s
diff --git
a/src/math/i386/acos.s
b/src/math/i386/acos.s
index
4f0168f
..
47f365e
100644
(file)
--- 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:
.global acosf
.type acosf,@function
acosf:
@@
-14,19
+16,13
@@
acosl:
.type acos,@function
acos:
fldl 4(%esp)
.type acos,@function
acos:
fldl 4(%esp)
-1: fld1
- fld %st(1)
+1: fld %st(0)
fld1
fld1
- fsubp
- fxch %st(2)
- faddp
- fdivp
+ fsub %st(0),%st(1)
+ fadd %st(2)
+ fmulp
fsqrt
fsqrt
- f
ld1
+ f
abs # fix sign of zero (matters in downward rounding mode)
fxch %st(1)
fpatan
fxch %st(1)
fpatan
- fld1
- fld1
- faddp
- fmulp
ret
ret