Increase PRN 'a' and 'c' constants.
Increase PRN 'a' and 'c' constants, so that high bits tend to cascade more.
This commit is contained in:
parent
9ce3bfd92d
commit
c6e950665c
@ -45,7 +45,7 @@ struct ckh_s {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Used for pseudo-random number generation. */
|
/* Used for pseudo-random number generation. */
|
||||||
#define CKH_A 12345
|
#define CKH_A 1103515241
|
||||||
#define CKH_C 12347
|
#define CKH_C 12347
|
||||||
uint32_t prn_state;
|
uint32_t prn_state;
|
||||||
|
|
||||||
|
@ -644,7 +644,7 @@ prof_sample_threshold_update(void)
|
|||||||
*/
|
*/
|
||||||
PROF_SAMPLE_STATE_GET(prof_sample_state);
|
PROF_SAMPLE_STATE_GET(prof_sample_state);
|
||||||
prn64(r, 53, prof_sample_state->prn_state,
|
prn64(r, 53, prof_sample_state->prn_state,
|
||||||
(uint64_t)1125899906842625LLU, 1058392653243283975);
|
(uint64_t)6364136223846793005LLU, (uint64_t)1442695040888963407LLU);
|
||||||
u = (double)r * (1.0/9007199254740992.0L);
|
u = (double)r * (1.0/9007199254740992.0L);
|
||||||
prof_sample_state->threshold = (uint64_t)(log(u) /
|
prof_sample_state->threshold = (uint64_t)(log(u) /
|
||||||
log(1.0 - (1.0 / (double)((uint64_t)1U << opt_lg_prof_sample))))
|
log(1.0 - (1.0 / (double)((uint64_t)1U << opt_lg_prof_sample))))
|
||||||
|
Loading…
Reference in New Issue
Block a user