diff options
author | pelissip <pelissip@280ebfd0-de03-0410-8827-d642c229c3f4> | 2004-12-17 13:36:51 +0000 |
---|---|---|
committer | pelissip <pelissip@280ebfd0-de03-0410-8827-d642c229c3f4> | 2004-12-17 13:36:51 +0000 |
commit | 047288b35205c9614b5e845389ae436ee0cd9172 (patch) | |
tree | a3a576bb1e6fb7ee18cb0d6bb582427db07d6516 /sin.c | |
parent | 39c7d106d8d50ef58ada11ab07b351e12db9269b (diff) | |
download | mpfr-047288b35205c9614b5e845389ae436ee0cd9172.tar.gz |
Optimize the computing of the sign of sinus if GET_EXP(x) < 0
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3153 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'sin.c')
-rw-r--r-- | sin.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -34,7 +34,10 @@ mpfr_sin_sign (mpfr_srcptr x) mpfr_srcptr y; K = MPFR_GET_EXP(x); - m = (K < 0) ? 0 : K; + + if (K < 0) /* Trivial case if x < 1 */ + return MPFR_SIGN (x); + m = K; mpfr_init2 (c, 2); mpfr_init2 (k, 2); |