[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: very weird random numbers with jot on macppc



Eric Faurot wrote:
> I've noted that jot(1) behaviour is erratic on my system (ibook)
> wrt to random number generation.

Not a solution to this interesting problem but if you want to get
real random numbers you can use this little program I wrote:

/*
 * Copyright 2003, 2005 Han Boetes <han_(_at_)_mijncomputer_(_dot_)_nl>
 * This is released in public domain.
 *
 * Compile this thingie with:
 *
 * gcc random_number.c -o random_number
 */

#include <stdlib.h>
#include <stdio.h>

int
main(void)
{
	u_int32_t	random_number;
	random_number = arc4random();
	printf("%u\n", random_number);
	return 0;
}



# Han



Visit your host, monkey.org