acos.s fix: use the formula acos(x) = atan2(sqrt(1-x),sqrt(1+x))
authornsz <nsz@port70.net>
Thu, 22 Mar 2012 13:54:47 +0000 (14:54 +0100)
committernsz <nsz@port70.net>
Thu, 22 Mar 2012 13:54:47 +0000 (14:54 +0100)
commita4a0c91275788407763b1e5a9da17b777495ca85
tree1c4e53cfe0c6b0ab80df621813acb74715e9ab3b
parent2e0c1fed36be1f1435de79bfc7cdc34824cb5614
acos.s fix: use the formula acos(x) = atan2(sqrt(1-x),sqrt(1+x))

the old formula atan2(1,sqrt((1+x)/(1-x))) was faster but
could give nan result at x=1 when the rounding mode is
FE_DOWNWARD (so 1-1 == -0 and 2/-0 == -inf), the new formula
gives -0 at x=+-1 with downward rounding.
src/math/i386/acos.s
src/math/x86_64/acosl.s