Beispiel #1
0
char* generate_uuid(char out[36])
{
    sprintf(out, "%08lx-%04x-%04x-%04x%04x%04x%04x", time(NULL), rand_word(), rand_word(), rand_word(), rand_word(), rand_word(), rand_word());
    return out;
}
Beispiel #2
0
double rand_uniopen (void)
{
  return (0.5+(double)rand_word()) / (1.0+(double)0x7fffffff);
}
Beispiel #3
0
void rand_word_array(word w[], int bit_num) {
    int word_num = bit_num / 32;
    int i;
    for(i=0; i<word_num; i++)
        w[i] = rand_word();
}
Beispiel #4
0
double rand_uniform (void)
{
  return (double)rand_word() / (1.0+(double)0x7fffffff);
}