Dear all,
I am hitting a wall with the attached code in CL and C versions. For those interested, this is code lifted from Knuth's pages on random number generation (https://www-cs-faculty.stanford.edu/~knuth/programs.html#rng).
The problem is that there is a discrepancy in the "problem" loop between the CL and the C and I cannot figure out why, although the culprit may be that CL does not have "proper" 64 bits ints.
I am running on LW 8.x on an Intel Mac. I have not tried on other CL implementations/platforms. I compile the C code with clang (Apple clang version 15.0.0 (clang-1500.0.40.1)
If you run the code, you will see that the discrepancy appears at 'j = 14' in the loop.
What gives?
Thanks
Marco