diff options
author | ariel faigon <github.2009@yendor.com> | 2014-01-15 01:02:48 +0400 |
---|---|---|
committer | ariel faigon <github.2009@yendor.com> | 2014-01-15 01:02:48 +0400 |
commit | 56604c6a16819b78bc98498c40882c925c58c9bc (patch) | |
tree | 197401e65af2db0ebf6f8d035def9906a4ad18ca /vowpalwabbit/rand48.cc | |
parent | 2cc1a5f9f6b569292c0dc147fca167dcfe0ea1c3 (diff) |
This _may_ be the 32-bit random failure smoking gun (constant assigned into 'a' truncated from 64 to 32 bit in 32-bit envs)
Diffstat (limited to 'vowpalwabbit/rand48.cc')
-rw-r--r-- | vowpalwabbit/rand48.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/vowpalwabbit/rand48.cc b/vowpalwabbit/rand48.cc index 5da05cea..65ec055e 100644 --- a/vowpalwabbit/rand48.cc +++ b/vowpalwabbit/rand48.cc @@ -3,7 +3,12 @@ #include <iostream> using namespace std; -uint64_t a = 0xEECE66D5DEECE66D; +// +// NB: the 'ULL' suffix is not part of the constant it is there to +// prevent truncation of constant to (32-bit long) when compiling +// in a 32-bit env: warning: integer constant is too large for "long" type +// +uint64_t a = 0xEECE66D5DEECE66DULL; uint64_t c = 2147483647; int bias = 127 << 23; |