mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
bugfixes + tonlib update
This commit is contained in:
parent
2f81361a02
commit
eecf05ca59
35 changed files with 734 additions and 193 deletions
|
@ -166,10 +166,10 @@ double Random::fast(double min, double max) {
|
|||
Random::Xorshift128plus::Xorshift128plus(uint64 seed) {
|
||||
auto next = [&]() {
|
||||
// splitmix64
|
||||
seed += static_cast<uint64>(0x9E3779B97F4A7C15);
|
||||
seed += static_cast<uint64>(0x9E3779B97F4A7C15ull);
|
||||
uint64 z = seed;
|
||||
z = (z ^ (z >> 30)) * static_cast<uint64>(0xBF58476D1CE4E5B9);
|
||||
z = (z ^ (z >> 27)) * static_cast<uint64>(0x94D049BB133111EB);
|
||||
z = (z ^ (z >> 30)) * static_cast<uint64>(0xBF58476D1CE4E5B9ull);
|
||||
z = (z ^ (z >> 27)) * static_cast<uint64>(0x94D049BB133111EBull);
|
||||
return z ^ (z >> 31);
|
||||
};
|
||||
seed_[0] = next();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue