Full_Name: Kjetil Kjernsmo Version: Version 1.0.0 OS: osf1 Submission from: (NULL) (129.240.28.227) Dear all, 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 computer, and from the start, it looks like this:> rpois(1, 1000000 * rpois(1, 10000))[1] 1537190728> ^[[AError: syntax error [whoops, I'm usually using ESS]> rpois(1, 1000000 * rpois(1, 10000))[1] 1507263999> rpois(1000, 1000000 * rpois(1000, 10000))[hanged here, killed with ^C]> rpois(1, 1000000 * rpois(1, 10000))[1] 1463075843> rpois(1, 1000000 * rpois(1, 10000))[1] 1438068697> 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. Kjetil -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
>>>>> "PD" == Peter Dalgaard BSA <p.dalgaard@biostat.ku.dk> writes:PD> 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 PD> ........ >> > 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. PD> On Intel, that consistently gives >> rpois(1, 1000000 * rpois(1, 10000)) PD> [1] -2147483648 PD> I.e. signs of integer overflow. Apparently you partly get away with PD> it on a 64 bit machine, but I'm not surprised you get into regimes PD> that are not well tested by the poor developers working on hardware PD> from the bygone millennium.... I'm fixing this. It's clear in the source code (rpois.c) that `int's are used in places where they must overflow as soon as lambda > ~= .Machine$integer.max Martin Maechler <maechler@stat.math.ethz.ch> http://stat.ethz.ch/~maechler/ Seminar fuer Statistik, ETH-Zentrum LEO D10 Leonhardstr. 27 ETH (Federal Inst. Technology) 8092 Zurich SWITZERLAND phone: x-41-1-632-3408 fax: ...-1228 <>< -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._