[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ns] Problem with the generation of random numbers



Hi everybody,
 
I'm having a problem with the generation of random numbers. 
 
1 ) I'm computing N random variables with " Random::uniform() " THEN an exponential random variable using " ExponentialRandomVariable ". I get coherent results which seem correct. If I run this simulation plenty of time, I always get the same values, since I'm not changing any initial values.
I tried after to change the number N of random uniform variables, the exponential value changed. It shouldn't, no ?
These parameters are not correlated at all (except in the random generator?!).
 
2) Then I tried to reverse the order of these generations. For N=100, it gives me a result. For N=50, I get a "Floating Point Exception (core dumped)" !!!
 
Is there anybody who can help me solve this problem ?
 
Thanks in advance, Karim.


 
Karim El-Khazen
Email : [email protected] <mailto:[email protected]>   
Website : http://www.directmoving.com <http://www.directmoving.com> 

-----------------------------------------------------------------
Karim C. El-Khazen  [email protected] <mailto:[email protected]>   http://www.elkhazen.com <http://www.elkhazen.com> 
MS in Electrical & Computer Engineering, Georgia Tech, Atlanta, USA
Ericsson Radio Systems AB, S-164 80 Stockholm SWEDEN
-----------------------------------------------------------------