aboutsummaryrefslogtreecommitdiff
path: root/include/xorshift64.h
diff options
context:
space:
mode:
authortslil clingman <tslil@posteo.de>2021-01-23 20:48:34 -0500
committertslil <tslil@posteo.de>2021-01-23 20:48:34 -0500
commitd16cdbd9b8a9a8b364c59858f94b695266b62f4d (patch)
tree1568304dd2c33e03a7ecd4b84b4ba48b03670731 /include/xorshift64.h
parentc8a773eea311e91f6c75592ccff779065884edca (diff)
Hash collisions
Diffstat (limited to 'include/xorshift64.h')
-rw-r--r--include/xorshift64.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/include/xorshift64.h b/include/xorshift64.h
index ee41abc..62a0a4e 100644
--- a/include/xorshift64.h
+++ b/include/xorshift64.h
@@ -9,10 +9,9 @@ extern uint64_t xors;
xors ^= xors >> 12; \
xors ^= xors << 25; \
xors ^= xors >> 27; \
- xors *= 0x2545F4914F6CDD1D; \
}
-#define RANDOM64 (xors)
-#define RANDOM32 ((uint32_t)xors)
+#define RANDOM64 (xors*0x2545F4914F6CDD1D)
+#define RANDOM32 ((uint32_t)RANDOM64)
#endif