Hi,
This is not a really an issue, feel free to close this.
I was looking into the JSF RNG and I thought it is worth mentioning that the implementation in listing 0066 is using 64-bit integers in the generation function RandomU64 whereas the original post is using 32-bit integers. There is a section in the original post for the 64-bit variant where they recommend using a three-rotate version with the values (7,13,37) as follows:
u8 ranval( ranctx *x ) {
u8 e = x->a - rot(x->b, 7);
x->a = x->b ^ rot(x->c, 13);
x->b = x->c + rot(x->d, 37);
x->c = x->d + e;
x->d = e + x->a;
return x->d;
}
Listing 0066:
|
u64 E = A - RotateLeft(B, 27); |
|
|
|
A = (B ^ RotateLeft(C, 17)); |
|
B = (C + D); |
|
C = (D + E); |
|
D = (E + A); |
This is probably irrelevant and very insignificant but I thought I would mention it for the record and for the sake of completion
Hi,
This is not a really an issue, feel free to close this.
I was looking into the JSF RNG and I thought it is worth mentioning that the implementation in listing 0066 is using 64-bit integers in the generation function
RandomU64whereas the original post is using 32-bit integers. There is a section in the original post for the 64-bit variant where they recommend using a three-rotate version with the values (7,13,37) as follows:Listing 0066:
computer_enhance/perfaware/part2/listing_0066_haversine_generator_main.cpp
Lines 57 to 62 in 2321125
This is probably irrelevant and very insignificant but I thought I would mention it for the record and for the sake of completion