From ec2cac2138ea53075993d955397e60cbb0b5dc3b Mon Sep 17 00:00:00 2001 From: vlefevre Date: Sun, 27 Aug 2017 20:54:16 +0000 Subject: [tests/turandom.c] In bug20170123, use a local gmp_randstate_t variable instead of mpfr_rands, due to the gmp_randseed_ui. (merged changeset r11654 from the trunk) git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@11667 280ebfd0-de03-0410-8827-d642c229c3f4 --- tests/turandom.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/turandom.c b/tests/turandom.c index 4b8746abc..a3ea36fc1 100644 --- a/tests/turandom.c +++ b/tests/turandom.c @@ -229,14 +229,17 @@ bug20170123 (void) #if __MPFR_GMP(4,2,0) mpfr_t x; mpfr_exp_t emin; + gmp_randstate_t s; emin = mpfr_get_emin (); mpfr_set_emin (-7); mpfr_init2 (x, 53); - gmp_randseed_ui (mpfr_rands, 398); - mpfr_urandom (x, mpfr_rands, MPFR_RNDN); + gmp_randinit_default (s); + gmp_randseed_ui (s, 398); + mpfr_urandom (x, s, MPFR_RNDN); MPFR_ASSERTN(mpfr_cmp_ui_2exp (x, 1, -8) == 0); mpfr_clear (x); + gmp_randclear (s); mpfr_set_emin (emin); #endif } -- cgit v1.2.1