Arc Forumnew | comments | leaders | submitlogin
Does anyone know how to generate a random number?
2 points by goodbyejim 6119 days ago | 3 comments
I would like a uniformly distributed random number between 0 and 1. Does Arc provide this?


2 points by hilbertastro 6119 days ago | link

I like to use the Mersenne Twister for my pseudorandom numbers. The source code (in C) is illuminating. Or you can check out www.netlib.org for other implementations (in e.g., Fortran 77). Should be straightforward to translate them.

-----

1 point by bOR_ 6119 days ago | link

It's in ruby too. Something that works nice if you're writing models using the gillespie algorithm (as I happen to be ;).

-----

4 points by pg 6119 days ago | link

(rand)

-----