[Mono-list] GemBox.Spreadsheet 2.9 supporting Mono
alan.mcgovern at gmail.com
Mon Sep 10 13:25:32 EDT 2007
If you need the same numbers for a given seed, why are you using a random
number generator? If you need reproducible pseudo-random numbers then you
could just SHA1 has your seed, which gives you 20 bytes (4 integers). Then
if you need more numbers, SHA1 hash the result from the previous operation
to get a new set of 20 bytes (4 integers) and keep going until you have all
the numbers you need. This is guaranteed to produce the same psuedo-random
numbers on every platform every time.
On 9/10/07, Miguel de Icaza <miguel at novell.com> wrote:
> > After customer request, we have modified our .NET component to work with
> > Mono. To do so few minor changes were required and full rewrite of
> > methods (since .NET Framework and Mono return different random values
> > the same seed).
> This seems like an odd dependency to have (depending on the random
> number generator to have the same values).
> Is there a reason for that?
> Mono-list maillist - Mono-list at lists.ximian.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mono-list