[Mono-osx] bug in Random
jmalcolm
malcolm.justin at gmail.com
Wed May 11 12:30:15 EDT 2011
Campbell wrote:
>
> This is a total showstopper for me. I use a seeded random number in my VB
> code and backwardly support older versions using the same algorithm, so I
> cannot change what I have. I was extremely disappointed to find that Mono
> creates a completely different random number from the same seed. I mean,
> what on earth does it do that for? Microsoft's algorithm hasn't changed
> in 10 years. I thought Mono was supposed to be compatible with .Net?!?!
>
The spec says that the random sequence must be repeatable given the same
initial seed. Mono does this. Any application that relies on this behaviour
should be fine on Mono and .NET.
It seems that a few apps require more than that. They require that the same
sequence actually not only be repeatable but in fact be identical between
platforms and implementations. Mono uses a different algorithm than
Microsoft does and so gives different streams of random numbers.
The number of people that require this stricter (stricter than the spec)
behaviour is apparently too small for the Mono team to justify investing in
the effort. That said, those that need this behaviour apparently absolutely
need it.
This seems to me to be a perfect situation for one of the applications that
rely on the very strict behiour to implement the behaviour they require and
contribute their implementation to the Mono project. It is even an
opportunity for these projects to work together on such an implementation.
It is times like this when the power of open source can really be
demonstrated.
--
View this message in context: http://mono.1490590.n4.nabble.com/bug-in-Random-tp1548935p3515181.html
Sent from the Mono - OSX mailing list archive at Nabble.com.
More information about the Mono-osx
mailing list