src/nmath/pgeom.c (PR#1834)

terra@diku.dk terra@diku.dk
Thu, 25 Jul 2002 20:55:35 +0200 (MET DST)


Full_Name: Morten Welinder
Version: 1.5.1
OS: Solaris/Linux
Submission from: (NULL) (192.5.35.38)


The line

    return log(1 - p) * (x + 1);

looks like it has problems for p near 1.  I would suggest rewriting it to

    return log1p (-p) * (x + 1);


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