summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorenge <enge@211d60ee-9f03-0410-a15a-8952a2c7a4e4>2011-09-13 18:53:39 +0000
committerenge <enge@211d60ee-9f03-0410-a15a-8952a2c7a4e4>2011-09-13 18:53:39 +0000
commit733a65beb140d8f8a23c5bdbaaab9feceb1826e6 (patch)
tree751af3cc0f3b2d996b0367fb704b2f5183414b15
parenta1cb567d9dc6adb7b08609b0c455c159ff6681a3 (diff)
downloadmpc-733a65beb140d8f8a23c5bdbaaab9feceb1826e6.tar.gz
tnorm.c: used GMP_RNDN instead of MPFR_RNDN etc. for compatibility with mpfr-2.4.2
git-svn-id: svn://scm.gforge.inria.fr/svn/mpc/trunk@1094 211d60ee-9f03-0410-a15a-8952a2c7a4e4
-rw-r--r--configure.ac2
-rw-r--r--tests/tnorm.c16
2 files changed, 9 insertions, 9 deletions
diff --git a/configure.ac b/configure.ac
index a93d766..e7b88c5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -212,7 +212,7 @@ case $host in
MPC_WINDOWS
esac
-# Checks for gcc version, result in GCC_VERSION inside config.log, for instance
+# Checks for gcc version, result in variables MPC_GCC etc. inside config.log
AX_GCC_VERSION
AC_DEFINE_UNQUOTED([MPC_GCC], ["$GCC"], [Gcc yes or no])
AC_DEFINE_UNQUOTED([MPC_CC], ["$CC"], [C compiler])
diff --git a/tests/tnorm.c b/tests/tnorm.c
index 23d76df..3f4dccd 100644
--- a/tests/tnorm.c
+++ b/tests/tnorm.c
@@ -30,11 +30,11 @@ test_underflow (void)
mpfr_set_emin (-1); /* smallest positive number is 0.5*2^emin = 0.25 */
mpc_init2 (z, 10);
- mpfr_set_ui_2exp (mpc_realref (z), 1023, -11, MPFR_RNDN); /* exact */
- mpfr_set_ui_2exp (mpc_imagref (z), 1023, -11, MPFR_RNDN); /* exact */
+ mpfr_set_ui_2exp (mpc_realref (z), 1023, -11, GMP_RNDN); /* exact */
+ mpfr_set_ui_2exp (mpc_imagref (z), 1023, -11, GMP_RNDN); /* exact */
mpfr_init2 (f, 10);
- inex = mpc_norm (f, z, MPFR_RNDZ); /* should give 511/1024 */
+ inex = mpc_norm (f, z, GMP_RNDZ); /* should give 511/1024 */
if (inex >= 0)
{
printf ("Error in underflow case (1)\n");
@@ -47,12 +47,12 @@ test_underflow (void)
printf ("got ");
mpfr_dump (f);
printf ("expected ");
- mpfr_set_ui_2exp (f, 511, -10, MPFR_RNDZ);
+ mpfr_set_ui_2exp (f, 511, -10, GMP_RNDZ);
mpfr_dump (f);
exit (1);
}
- inex = mpc_norm (f, z, MPFR_RNDN); /* should give 511/1024 */
+ inex = mpc_norm (f, z, GMP_RNDN); /* should give 511/1024 */
if (inex >= 0)
{
printf ("Error in underflow case (2)\n");
@@ -65,12 +65,12 @@ test_underflow (void)
printf ("got ");
mpfr_dump (f);
printf ("expected ");
- mpfr_set_ui_2exp (f, 511, -10, MPFR_RNDZ);
+ mpfr_set_ui_2exp (f, 511, -10, GMP_RNDZ);
mpfr_dump (f);
exit (1);
}
- inex = mpc_norm (f, z, MPFR_RNDU); /* should give 1023/2048 */
+ inex = mpc_norm (f, z, GMP_RNDU); /* should give 1023/2048 */
if (inex <= 0)
{
printf ("Error in underflow case (3)\n");
@@ -83,7 +83,7 @@ test_underflow (void)
printf ("got ");
mpfr_dump (f);
printf ("expected ");
- mpfr_set_ui_2exp (f, 1023, -11, MPFR_RNDZ);
+ mpfr_set_ui_2exp (f, 1023, -11, GMP_RNDZ);
mpfr_dump (f);
exit (1);
}