summaryrefslogtreecommitdiff
path: root/cos.c
diff options
context:
space:
mode:
authorzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2007-06-25 13:29:38 +0000
committerzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2007-06-25 13:29:38 +0000
commitc11baac01cd3d4ba2e8d26c1f26055a64121c422 (patch)
treea21eb3a86e35fe2857abf539f453e4a430595d51 /cos.c
parent986abcf6c12926787f5ab668c86f801745043440 (diff)
downloadmpfr-c11baac01cd3d4ba2e8d26c1f26055a64121c422.tar.gz
fixed stupid bug (subtraction of unsigned longs)
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@4573 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'cos.c')
-rw-r--r--cos.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cos.c b/cos.c
index c8587a27b..8c6832eeb 100644
--- a/cos.c
+++ b/cos.c
@@ -229,7 +229,7 @@ mpfr_cos (mpfr_ptr y, mpfr_srcptr x, mp_rnd_t rnd_mode)
than 2^(-precy) for directed rounding, or 2^(-precy-1) for rounding
to nearest. */
{
- if (m - k >= precy + (rnd_mode == GMP_RNDN))
+ if (m > k && (m - k >= precy + (rnd_mode == GMP_RNDN)))
{
/* if round to nearest or away, result is s,
otherwise it is round(nexttoward (s, 0)) */