diff options
author | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 2007-05-25 21:03:43 +0000 |
---|---|---|
committer | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 2007-05-25 21:03:43 +0000 |
commit | f380ece2680461570e1ce03956ebb173b63052f6 (patch) | |
tree | 416a24eb4de8fb3a2c8527c99dd171444ee96c3a /tests/tremquo.c | |
parent | d73e9728f5637337485cc1015335da914b8b7e19 (diff) | |
download | mpfr-f380ece2680461570e1ce03956ebb173b63052f6.tar.gz |
completed implementation of Vincent's algorithm for mpfr_remquo
all tests now pass again
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@4467 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/tremquo.c')
-rw-r--r-- | tests/tremquo.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/tests/tremquo.c b/tests/tremquo.c index dc57aca66..698a110d2 100644 --- a/tests/tremquo.c +++ b/tests/tremquo.c @@ -119,18 +119,28 @@ main (int argc, char *argv[]) mpfr_set_prec (x, 53); mpfr_set_prec (y, 53); - + + /* check four possible sign combinations */ mpfr_set_ui (x, 42, GMP_RNDN); mpfr_set_ui (y, 17, GMP_RNDN); mpfr_remquo (r, q, x, y, GMP_RNDN); MPFR_ASSERTN (mpfr_cmp_ui (r, 8) == 0); MPFR_ASSERTN (q[0] == (long) 2); - mpfr_set_si (x, -42, GMP_RNDN); mpfr_set_ui (y, 17, GMP_RNDN); mpfr_remquo (r, q, x, y, GMP_RNDN); MPFR_ASSERTN (mpfr_cmp_si (r, -8) == 0); MPFR_ASSERTN (q[0] == (long) -2); + mpfr_set_si (x, -42, GMP_RNDN); + mpfr_set_si (y, -17, GMP_RNDN); + mpfr_remquo (r, q, x, y, GMP_RNDN); + MPFR_ASSERTN (mpfr_cmp_si (r, -8) == 0); + MPFR_ASSERTN (q[0] == (long) 2); + mpfr_set_ui (x, 42, GMP_RNDN); + mpfr_set_si (y, -17, GMP_RNDN); + mpfr_remquo (r, q, x, y, GMP_RNDN); + MPFR_ASSERTN (mpfr_cmp_ui (r, 8) == 0); + MPFR_ASSERTN (q[0] == (long) -2); mpfr_set_prec (x, 100); mpfr_set_prec (y, 50); |