---------- * Random number generator used by sampling *---------- */
| 309 | *---------- |
| 310 | */ |
| 311 | void |
| 312 | sampler_random_init_state(long seed, SamplerRandomState randstate) |
| 313 | { |
| 314 | randstate[0] = 0x330e; /* same as pg_erand48, but could be anything */ |
| 315 | randstate[1] = (unsigned short) seed; |
| 316 | randstate[2] = (unsigned short) (seed >> 16); |
| 317 | } |
| 318 | |
| 319 | /* Select a random value R uniformly distributed in (0 - 1) */ |
| 320 | double |
no outgoing calls
no test coverage detected