Wip/c less genrand calls

for consistency, reduce the number of calls to PRNG to 2, for C and C++.