[prev in list] [next in list] [prev in thread] [next in thread]
List: gmp-discuss
Subject: mpz_urandomm function return the same value
From: arndt () jjj ! de (Joerg Arndt)
Date: 2011-09-21 18:47:44
Message-ID: 20110921184744.GA21350 () jjj ! de
[Download RAW message or body]
What about using your brain and reading the docs for a start?
* Creatxr <creatxr at gmail.com> [Sep 21. 2011 20:16]:
> Hi,
> could somebody tell me why it always the same value with function
> "mpz_unrandmm".
> thanks.
> ----------------------------------------------------------------
> mpz_t rop, n;
> gmp_randstate_t state;
> mpz_init(rop); mpz_init(n);
> gmp_randinit_default(state);
>
> mpz_set_ui(n, o);
> mpz_urandomm(rop, state, n); ////////////////// rop return the same value
> r.setValue(rop); //////////////////set rop the r object field, rop
> is always the same value
>
> gmp_randclear(state);
> mpz_clear(rop); mpz_clear(n);
> _______________________________________________
> gmp-discuss mailing list
> gmp-discuss at gmplib.org
> https://gmplib.org/mailman/listinfo/gmp-discuss
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic