src/nmath/pgeom.c (PR#1834)
ripley@stats.ox.ac.uk
ripley@stats.ox.ac.uk
Fri, 26 Jul 2002 09:02:53 +0200 (MET DST)
On Thu, 25 Jul 2002 terra@diku.dk wrote:
> 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
Could you give us an example of the problems please? Otherwise how
will we know that we have solved them?
> return log1p (-p) * (x + 1);
Please report the bug (see BUGS in the FAQ) and not the solution. It
seems to me to be working fine for p as small as 10^(-8) which is already
way beyond a feasible application of a geometric (as an exponential would
be used instead).
--
Brian D. Ripley, ripley@stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272860 (secr)
Oxford OX1 3TG, UK Fax: +44 1865 272595
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._