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

From: Gilles GUILLOT <gilles.guillot_at_inapg.inra.fr>
Date: Wed 30 Nov 2005 - 09:51:22 GMT


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.d0,0.5d0)
write(*,*) 'b=',b

In certain cases, after a few iterations in the loop, b get stuck at 1

Any hint to explain that would help.

Gilles

--

電電電電電電電電電電電電電電電電電電電電電電電電電電電電電電電電電
Gilles Guillot
INRA - MIA Paris

Currently working from Gteborg Stochastic Centre Eklandagatan 86 - Rum1439
Chalmers University of Technology
SE 412-96 Gteborg Sweden
Phone +46 31 772 3514 / Fax +46 31772 3508

www.inapg.inra.fr/ens_rech/mathinfo/personnel/guillot/welcome.html

電電電電電電電電電電電電電電電電電電電電電電電電電電電電電電電電電

______________________________________________

R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Wed Nov 30 20:58:51 2005

This archive was generated by hypermail 2.1.8 : Wed 30 Nov 2005 - 11:21:40 GMT