This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

R: Random no. problem


you can look at:

http://lib-www.lanl.gov/numerical/bookc.html

Regards.
FS

-----Messaggio originale-----
Da: Charles Wilson <cwilson@ece.gatech.edu>
A: saurabh deshpande <saurabhd@andrew.cmu.edu>
Cc: cygwin@sourceware.cygnus.com <cygwin@sourceware.cygnus.com>
Data: mercoledì 5 luglio 2000 19.29
Oggetto: Re: Random no. problem


>
>
>saurabh deshpande wrote:
>>
>
>> When compiled on Sun Solaris or SGI Irix 6.4 using gcc compier i get
16838.
>> When compiled on Windows NT 4 using Cygnus gcc compiler i get 1103527590.
>> Is there a way i can get the same random numbers on Windows NT 4 and
>> Sun/SGI ?
>>
>
>Not easily. You cannot depend on separate implementations of random
>number generators to give the same results. The only way to get what you
>seem to want (a repeatable pseudo-random sequence on multiple
>architectures) is to roll your own random number generator routine, and
>seed it with the same seed on each architecture. See (for instance)
>"Numerical Recipes in C" or something similar, for relatively decent
>RNGs.
>
>In any case, this is more of a cross-platform, C programming issue, and
>not really a cygwin-specific issue, so you should probably find another
>list to discuss this topic.
>
>--Chuck
>
>--
>Want to unsubscribe from this list?
>Send a message to cygwin-unsubscribe@sourceware.cygnus.com
>
>


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]