Hi Forum,
I was trying a few variation of $dist_exponential function in edalink
There are 2 scenarios of the actual argument to seed
(a) It’s a run-time variable i.e manually seeded
(b) Using $urandom()
In (a) I observe that even on random seeds a tool gives same output. Further I notice that the output is same across all tools. I believe this is due to the initial seed being the same i.e 1
In (b) as $urandom gets a different seed based on master seed ( due to tool based random seed switch ), the results are different across tools ( refer thread )
As per LRM
For each system function, the seed argument is an inout argument;
that is, a value is passed to the function, and a different value is returned
In (a) value of 1 is repeated as the inout seed argument ( -417135238 ) remains the same during 2nd occurrence
Seeking inputs on the following
(Q1) Why does seed change after 2nd occurrence of value of 1 ? Shouldn’t it keep on repeating value as 1 due to seed being same ?
(Q2) What is the range of values returned by $dist_exponential( seed , mean ) ?
(Q3) Should the actual argument to seed always be $urandom ? Is there any alternative ?
Thanks