summaryrefslogtreecommitdiff
path: root/tests/read_data.c
diff options
context:
space:
mode:
authorenge <enge@211d60ee-9f03-0410-a15a-8952a2c7a4e4>2011-09-01 18:58:30 +0000
committerenge <enge@211d60ee-9f03-0410-a15a-8952a2c7a4e4>2011-09-01 18:58:30 +0000
commitc99f17f4fb8f05d49ab428cea31faae3aead882d (patch)
tree62feb628a1c4888ade6f75364ab0d5bb1b97fed2 /tests/read_data.c
parent4cbb8daab4917d6edc7da0ed175e1bd29f351ca5 (diff)
downloadmpc-c99f17f4fb8f05d49ab428cea31faae3aead882d.tar.gz
tdiv.c, div.dat: moved tests to data file
exposes a sign bug in mpc_div read_data.c: corrected undocumented assumption on mpfr_signbit git-svn-id: svn://scm.gforge.inria.fr/svn/mpc/trunk@1064 211d60ee-9f03-0410-a15a-8952a2c7a4e4
Diffstat (limited to 'tests/read_data.c')
-rw-r--r--tests/read_data.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/read_data.c b/tests/read_data.c
index 9c673fd..0b1b794 100644
--- a/tests/read_data.c
+++ b/tests/read_data.c
@@ -421,8 +421,8 @@ check_compatible (int inex, mpfr_t expected, mpfr_rnd_t rnd, const char *s)
{
if ((rnd == GMP_RNDU && inex == -1) ||
(rnd == GMP_RNDD && inex == +1) ||
- (rnd == GMP_RNDZ && mpfr_signbit (expected) == 0 && inex == +1) ||
- (rnd == GMP_RNDZ && mpfr_signbit (expected) == 1 && inex == -1))
+ (rnd == GMP_RNDZ && !mpfr_signbit (expected) && inex == +1) ||
+ (rnd == GMP_RNDZ && mpfr_signbit (expected) && inex == -1))
{
if (s != NULL)
printf ("Incompatible ternary value '%c' (%s part) in file '%s' line %lu\n",