1 #include <cln/number.h>
3 #include <cln/integer.h>
6 #include <cln/random.h>
7 #include "cl_random_impl.h"
10 #include <cln/timing.h>
12 int main (int argc, char * argv[])
15 if ((argc >= 3) && !strcmp(argv[1],"-r")) {
16 repetitions = atoi(argv[2]);
21 uintL len = atoi(argv[1]);
27 num_stack_alloc(len,a_MSDptr=,a_LSDptr=);
28 num_stack_alloc(len,b_MSDptr=,b_LSDptr=);
29 random_UDS(default_random_state,a_MSDptr,len);
30 lspref(a_LSDptr,0) |= 1; // force a to be odd
32 for (int rep = repetitions; rep > 0; rep--)
33 { recip2adic(len,a_LSDptr,b_LSDptr); }