mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
ci: fix the vinix-build job
This commit is contained in:
@ -620,11 +620,13 @@ static inline uint64_t wyhash64(uint64_t A, uint64_t B){ A^=0xa0761d6478bd642ful
|
||||
// the wyrand PRNG that pass BigCrush and PractRand
|
||||
static inline uint64_t wyrand(uint64_t *seed){ *seed+=0xa0761d6478bd642full; return _wymix(*seed,*seed^0xe7037ed1a0b428dbull);}
|
||||
|
||||
#ifndef __vinix__
|
||||
// convert any 64 bit pseudo random numbers to uniform distribution [0,1). It can be combined with wyrand, wyhash64 or wyhash.
|
||||
static inline double wy2u01(uint64_t r){ const double _wynorm=1.0/(1ull<<52); return (r>>12)*_wynorm;}
|
||||
|
||||
// convert any 64 bit pseudo random numbers to APPROXIMATE Gaussian distribution. It can be combined with wyrand, wyhash64 or wyhash.
|
||||
static inline double wy2gau(uint64_t r){ const double _wynorm=1.0/(1ull<<20); return ((r&0x1fffff)+((r>>21)&0x1fffff)+((r>>42)&0x1fffff))*_wynorm-3.0;}
|
||||
#endif
|
||||
|
||||
#if(!WYHASH_32BIT_MUM)
|
||||
// fast range integer random number generation on [0,k) credit to Daniel Lemire. May not work when WYHASH_32BIT_MUM=1. It can be combined with wyrand, wyhash64 or wyhash.
|
||||
|
Reference in New Issue
Block a user