summaryrefslogtreecommitdiff
path: root/tests/tgeneric.c
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2015-06-05 00:22:02 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2015-06-05 00:22:02 +0000
commit4841179ab5117f37880e1aacb7151d5c0e32a255 (patch)
treef609270e880d26e495efe52dee8f1aee31af3e1c /tests/tgeneric.c
parent8f770e06527128bb0a3efde0c5e5016aef1dd061 (diff)
downloadmpfr-4841179ab5117f37880e1aacb7151d5c0e32a255.tar.gz
[tests/tgeneric.c] Special cases with unsigned long argument.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9510 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/tgeneric.c')
-rw-r--r--tests/tgeneric.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/tgeneric.c b/tests/tgeneric.c
index 25bbdf85c..075163ac7 100644
--- a/tests/tgeneric.c
+++ b/tests/tgeneric.c
@@ -204,19 +204,13 @@ test_generic (mpfr_prec_t p0, mpfr_prec_t p1, unsigned int nmax)
TEST_RANDOM_ALWAYS_SCALE);
#endif
#endif /* ! defined(RAND_FUNCTION) */
-
-#if defined(ULONG_ARG1) || defined(ULONG_ARG2)
- i = randlimb ();
- inexact = mpfr_set_ui (u, i, MPFR_RNDN);
- MPFR_ASSERTN (inexact == 0);
-#endif
}
else
{
/* Special cases tested in precision p1 if n <= 3. They are
useful really in the extended exponent range. */
#if ((defined(DOUBLE_ARG1) || defined(DOUBLE_ARG2)) && \
- defined(MPFR_ERRDIVZERO)) || defined(ULONG_ARG1) || defined(ULONG_ARG2)
+ defined(MPFR_ERRDIVZERO))
goto next_n;
#endif
set_emin (MPFR_EMIN_MIN);
@@ -225,7 +219,7 @@ test_generic (mpfr_prec_t p0, mpfr_prec_t p1, unsigned int nmax)
{
mpfr_set_si (x, n == 0 ? 1 : -1, MPFR_RNDN);
mpfr_set_exp (x, mpfr_get_emin ());
-#if defined(TWO_ARGS_ALL)
+#if defined(TWO_ARGS) || defined(DOUBLE_ARG1) || defined(DOUBLE_ARG2)
mpfr_set_si (u, randlimb () % 2 == 0 ? 1 : -1, MPFR_RNDN);
mpfr_set_exp (u, mpfr_get_emin ());
#endif
@@ -234,13 +228,19 @@ test_generic (mpfr_prec_t p0, mpfr_prec_t p1, unsigned int nmax)
{
mpfr_set_si (x, n == 2 ? 1 : -1, MPFR_RNDN);
mpfr_setmax (x, REDUCE_EMAX);
-#if defined(TWO_ARGS_ALL)
+#if defined(TWO_ARGS) || defined(DOUBLE_ARG1) || defined(DOUBLE_ARG2)
mpfr_set_si (u, randlimb () % 2 == 0 ? 1 : -1, MPFR_RNDN);
mpfr_setmax (u, mpfr_get_emax ());
#endif
}
}
+#if defined(ULONG_ARG1) || defined(ULONG_ARG2)
+ i = randlimb ();
+ inexact = mpfr_set_ui (u, i, MPFR_RNDN);
+ MPFR_ASSERTN (inexact == 0);
+#endif
+
rnd = RND_RAND ();
mpfr_clear_flags ();
#ifdef DEBUG_TGENERIC