R-alpha: Hypergeometric Distribution

Ross Ihaka ihaka@stat.auckland.ac.nz
Mon, 12 May 1997 12:35:25 +1200 (NZST)


A cut and paste typo has crept in and is rendering all values returned
for the hypergeometric distribution incorrect.  The problem is in
src/main/arithmetic.c in the function "math4".  The lines

        PROTECT(sy = allocVector(REALSXP, n));
        a = REAL(sa);
        b = REAL(sb);
        c = REAL(sc);
        d = REAL(sc);	/* <-- change this line */
        y = REAL(sy);

should read

        PROTECT(sy = allocVector(REALSXP, n));
        a = REAL(sa);
        b = REAL(sb);
        c = REAL(sc);
        d = REAL(sd);	/* corrected */
        y = REAL(sy);

This will be part of the official 2nd patch to 0.49, but I'm pointing it
out anyway.
	Ross
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
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
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-