From maechler@stat.math.ethz.ch  Fri Apr  7 17:23:38 2000
From: maechler@stat.math.ethz.ch (maechler@stat.math.ethz.ch)
Date: Fri, 7 Apr 2000 18:23:38 +0200 (MET DST)
Subject: [Rd] Bug in qbinom? (PR#511)
Message-ID: <200004071623.SAA14021@pubhealth.ku.dk>

>>>>> "TL" == Thomas Lumley <thomas@biostat.washington.edu> writes:

    TL> On Fri, 7 Apr 2000 dtrenkler@nts6.oec.uni-osnabrueck.de wrote:
    >> n_10;p_0.5;jjx_0:n;qbinom(pbinom(jjx,n,p),n,p) #  This one works as
    >> expected
    >> 
    >> n_100;p_0.5;jjx_0:n;qbinom(pbinom(jjx,n,p),n,p)  # This one causes
    >> severe problems

    TL> The problem is in qbinom(1-epsilon,100,0.5) for epsilon between
    TL> 10^-15 and 10^-17. It appears to go for ever.

    >> pbinom(jjx,n,p)[89]-1 
    TL> [1] -1.110223e-16

    TL> An even simpler version is
    TL> qbinom(1-1e-16,2,0.5)

    TL> Presumably a check for zero needs some fuzz.

Note that we (I) also have a considerable improvement for  dbinom() in the
pipeline, from  Clive Loader's post of a few weeks ago.

But this may be a completely orthogonal issue...
I will have a look over the weekend.

Martin

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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] Bug in qbinom? (PR#511)
maechler@stat.math.ethz.ch