-2
\$\begingroup\$

The task is to make a function which returns random number, no build in functions allowed, returned value should be random or pseudo-random and no sequence allowed, no matter what the formula is and how scattered values are.

To simplify task, returned value should be 32-bit integer or float from range [0; 1)

It is code golf, shortest code wins :)

\$\endgroup\$
0

1 Answer 1

3
\$\begingroup\$

CoffeeScript (16 bytes)

->new Date%2**32

This is awful random number generator, but if you wait enough, you can get any integer.

\$\endgroup\$

Not the answer you're looking for? Browse other questions tagged or ask your own question.