I want to make sure i understand what the following code is doing:
So when someone calls on expdev, passing in idum, the value of idum is changed via ran0 correct? so if idum is 3 to start out with and runs once, the 2nd run of this function will have a different idum value right?Code:#include <math.h>
float expdev(long *idum) {
float ran0(long *idum);
float dummy;
do
dummy=ran0(idum);
while (dummy == 0.0);
return -log(dummy);
}