diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2012-03-08 12:22:04 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2012-03-08 12:22:04 +0000 |
commit | a3a92fd955af3b0ab88a37918fc80f85c2ba99c2 (patch) | |
tree | 004780881dc10f0ccd9eb8538c501c2732998e19 /tests/tinits.c | |
parent | db0f9e612fcdd44248f0bde30539942d8e5f4c50 (diff) | |
download | mpfr-a3a92fd955af3b0ab88a37918fc80f85c2ba99c2.tar.gz |
[tests/tinits.c] Improved the large precision test so that it is still
performed after r8035 (where MPFR_PREC_MAX has been decreased).
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@8077 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/tinits.c')
-rw-r--r-- | tests/tinits.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/tinits.c b/tests/tinits.c index e9b959382..43a863e2a 100644 --- a/tests/tinits.c +++ b/tests/tinits.c @@ -38,9 +38,11 @@ main (void) /* test for precision 2^31-1, see https://gforge.inria.fr/tracker/index.php?func=detail&aid=13918 */ large_prec = 2147483647; - if (getenv ("MPFR_CHECK_LARGEMEM") != NULL && - large_prec <= MPFR_PREC_MAX) + if (getenv ("MPFR_CHECK_LARGEMEM") != NULL) { + /* We assume that the precision won't be increased internally. */ + if (large_prec > MPFR_PREC_MAX) + large_prec = MPFR_PREC_MAX; mpfr_inits2 (large_prec, a, b, (mpfr_ptr) 0); mpfr_set_ui (a, 17, MPFR_RNDN); mpfr_set (b, a, MPFR_RNDN); |