Skip to content

pgeom accuracy (PR#6687)

2 messages · Martin Maechler

#
Morten> Full_Name: M. Welinder Version: 1.6.2 and 1.8.1 OS:
    Morten> Solaris Submission from: (NULL) (65.213.85.223)


    Morten> The common lower_tail==TRUE && log_p==FALSE case can
    Morten> be improved as

    Morten>   if (lower_tail && !log_p) return -expm1 ((x + 1) *
    Morten> log1p (-p));

    Morten> This improves precision when p is very small and x
    Morten> not too big by avoiding two problematic "1-sth"
    Morten> calculations.

That's entirely correct,
Thank you, Morten!

Improvement committed for R 1.9.0 beta.
Martin
#
Morten> Full_Name: M. Welinder Version: 1.6.2 and 1.8.1 OS:
    Morten> Solaris Submission from: (NULL) (65.213.85.223)


    Morten> The common lower_tail==TRUE && log_p==FALSE case can
    Morten> be improved as

    Morten> if (lower_tail && !log_p) return -expm1 ((x + 1) *
    Morten> log1p (-p));

    Morten> This improves precision when p is very small and x
    Morten> not too big by avoiding two problematic "1-sth"
    Morten> calculations.

    MM> That's entirely correct, Thank you, Morten!

    MM> Improvement committed for R 1.9.0 beta.  Martin

eehm;  this meant I had done the committment command, but
it timed out :

cvs.r-project.org is currently not available from here.
Martin