Skip to content
Prev 250 / 63424 Next

R-alpha: unif_rand() again

Peter Dalgaard BSA wrote:

            
...
I'm not sure I see the point of the separate select_rand -- you can
just pass runif as an argument to unif_rand. The original example
needed to use the global variable because a C routine for finding a
zero of a C function was being used and the C function whose root was
to be found needed to get at the S/R function that it was fronting
for. The global variable is needed to pass this info (since you don't
have C closures). Here there isn't any need that I can see, but maybe
I've missed something (wouldn't be the first time :-)).