[Rd] R binomial RNG stuck at 1 via Fortran call

2005-11-30 Thread Gilles GUILLOT
wrapper now as part as the message, sorry about previous mail #include #include void F77_SUB(rndstart)(void) { GetRNGstate(); } void F77_SUB(rndend)(void) { PutRNGstate(); } double F77_SUB(ggrnorm)(double *mu, double *sigma) { return rnorm(*mu, *sigma); } double F77_SUB(ggrexp)(double *

[Rd] R binomial RNG stuck at 1 via Fortran call

2005-11-30 Thread Gilles GUILLOT
wrapper now attached -- ÅÅÅ Gilles Guillot INRA - MIA Paris Currently working from Göteborg Stochastic Centre Eklandagatan 86 - Rum1439 Chalmers University of Technology SE 412-96 Göteborg Sweden Phone +46 31 772 3514 / Fax +4

[Rd] R binomial RNG stuck at 1 via Fortran call

2005-11-30 Thread Gilles GUILLOT
Hi, I have some trouble with the result of a fortran function calling the R binomial RNG: The C function rbinom is wrapped as in the file attached. My main fortran program starts as call rndstart() and ends as call rndend() I happen to call the binomial RNG within a loop as b = ggrbinom(1