[Insight-developers] Random number reseeding
Gunnar Farneback
gunnar at bwh.harvard.edu
Mon Jan 17 15:14:27 EST 2005
> It looks like most compilers don't enforce it and automatically supply seeds
> if drand48 is called without a prior call to srand48. But cygwin does not
> seem to. (Cygwin uses Newlib for its math functions and there have been
> others with similar problems :
> http://sources.redhat.com/ml/cygwin/2004-11/msg00513.html)
I guess I'm missing some history here but I'm curious how it comes
that ITK is using the system-provided, and thus potentially platform
dependent, rand48 functions instead of having its own implementation
of a random number generator. For example the Mersenne Twister is
faster, gives higher quality random numbers, and there are C and C++
implementations available under the BSD license. See
http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt.html
and
http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/VERSIONS/C-LANG/c-lang.html
/Gunnar
More information about the Insight-developers
mailing list