Displaying 1 result from an estimated 1 matches for "one64".
2019 Mar 01
1
issue with sample in R 3.6.0.
...y changing 1L to at least a 64 bit integer, it appears that we
correct the problem:
double rbits(int bits)
{
int_least64_t v = 0;
for (int n = 0; n <= bits; n += 16) {
int v1 = (int) floor(unif_rand() * 65536);
v = 65536 * v + v1;
}
int_least64_t one64 = 1L;
// mask out the bits in the result that are not needed
return (double) (v & ((one64 << bits) - 1));
}
Regards,
Joseph Wood