From maechler at stat.math.ethz.ch  Tue Apr 13 09:38:34 2004
From: maechler at stat.math.ethz.ch (maechler@stat.math.ethz.ch)
Date: Tue Apr 13 09:38:54 2004
Subject: [Rd] pbinom accuracy (PR#6757)
Message-ID: <20040413073834.E888FFE9B@slim.kubism.ku.dk>

>>>>> "Morten" == Morten Welinder <terra@gnome.org>
>>>>>     on Mon, 12 Apr 2004 17:20:53 +0200 (CEST) writes:

    Morten> Full_Name: Morten Welinder
    Morten> Version: snapshot
    Morten> OS: 
    Morten> Submission from: (NULL) (65.213.85.129)


    Morten> There is really no good reason for throwing part of
    Morten> p's precision away in pbinom.  Using Ambramowitz &
    Morten> Stegun 26.5.2:

    Morten> -    return pbeta(1 - p, n - x, x + 1, lower_tail, log_p);
    Morten> +    return pbeta (p, x + 1, n - x, !lower_tail, log_p);

Indeed!
Thank you for the fix.

Martin M?chler


[Rd] pbinom accuracy (PR#6757)
maechler@stat.math.ethz.ch