diff options
| author | Tyge Løvset <[email protected]> | 2020-08-07 22:18:53 +0200 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2020-08-07 22:18:53 +0200 |
| commit | dba8a3ba10c93ff030c948ef3fa896693fa36f17 (patch) | |
| tree | d32b8eda39aec49fbbb7e1dc791b3bb1585af303 /stc | |
| parent | ca44e2a92fe670e09d6808cd5933f66be0980f50 (diff) | |
| download | STC-modified-dba8a3ba10c93ff030c948ef3fa896693fa36f17.tar.gz STC-modified-dba8a3ba10c93ff030c948ef3fa896693fa36f17.zip | |
Rngtest
Diffstat (limited to 'stc')
| -rw-r--r-- | stc/crandom.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/stc/crandom.h b/stc/crandom.h index cd6c98cd..96a07fc4 100644 --- a/stc/crandom.h +++ b/stc/crandom.h @@ -100,8 +100,7 @@ STC_INLINE int64_t crandom_uniform_i64(crandom_eng64_t* rng, crandom_distrib_i64 #elif defined(_MSC_VER)
int64_t hi; _mul128(crandom_i64(rng) >> 1, dist.range << 1, &hi); return dist.offset + hi;
#else
- return dist.offset + (((uint32_t) crandom_i64(rng) * dist.range) >> 32); // range up to 2^32
- //return dist.offset + crandom_i64(rng) % dist.range; // slow
+ return dist.offset + crandom_i64(rng) % dist.range; // slower
#endif
}
|
