[Rd] rpois hangs (PR#530)

Peter Dalgaard BSA p.dalgaard@biostat.ku.dk
30 Apr 2000 21:41:36 +0200


kjetikj@astro.uio.no writes:

> I have come across another really strange bug in rpois.
> If I do
> > rpois(1, 1000000 * rpois(1, 10000))
> sometimes it hangs, and hangs...
> On my XP1000 alphaev6 workstation, it seems to happen more 
> frequently than on other machines. I started a session on an older 
........
> > rpois(1, 1000000 * rpois(1, 10000))
> [hanging]
> 
> I think this is strange, because I've been doing this stuff 
> a lot lately, but usually with a rather small parameter to the 
> second rpois.  

On Intel, that consistently gives

>  rpois(1, 1000000 * rpois(1, 10000))
[1] -2147483648

I.e. signs of integer overflow. Apparently you partly get away with it
on a 64 bit machine, but I'm not surprised you get into regimes that
are not well tested by the poor developers working on hardware from
the bygone millennium....

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk)             FAX: (+45) 35327907
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._