From p.dalgaard@biostat.ku.dk  Sun Apr 30 20:41:36 2000
From: p.dalgaard@biostat.ku.dk (Peter Dalgaard BSA)
Date: 30 Apr 2000 21:41:36 +0200
Subject: [Rd] rpois hangs (PR#530)
In-Reply-To: kjetikj@astro.uio.no's message of "Sun, 30 Apr 2000 21:01:04 +0200 (MET DST)"
References: <200004301901.VAA28610@pubhealth.ku.dk>
Message-ID: <x2ya5vcr67.fsf@blueberry.kubism.ku.dk>

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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


[Rd] rpois hangs (PR#530)
Peter Dalgaard BSA