diff options
author | nsz <nsz@port70.net> | 2012-05-05 01:11:56 +0200 |
---|---|---|
committer | nsz <nsz@port70.net> | 2012-05-05 01:11:56 +0200 |
commit | f697d66b81912af59128ac1b96bc0e2a4514b758 (patch) | |
tree | 32433a4df7d33f692afa2ff6e759fa1c5870b8f0 /src/math/copysign.c | |
parent | db4096c5f2ffb15e52015004ab5a900b820c6683 (diff) | |
download | musl-f697d66b81912af59128ac1b96bc0e2a4514b758.tar.gz musl-f697d66b81912af59128ac1b96bc0e2a4514b758.tar.xz musl-f697d66b81912af59128ac1b96bc0e2a4514b758.zip |
math: change the formula used for acos.s
old: 2*atan2(sqrt(1-x),sqrt(1+x)) new: atan2(fabs(sqrt((1-x)*(1+x))),x) improvements: * all edge cases are fixed (sign of zero in downward rounding) * a bit faster (here a single call is about 131ns vs 162ns) * a bit more precise (at most 1ulp error on 1M uniform random samples in [0,1), the old formula gave some 2ulp errors as well)
Diffstat (limited to 'src/math/copysign.c')
0 files changed, 0 insertions, 0 deletions