[R] phyper returns negative results
    Prof Brian Ripley 
    ripley at stats.ox.ac.uk
       
    Tue Oct  2 20:17:06 CEST 2007
    
    
  
On Tue, 2 Oct 2007, Bastian Angermann wrote:
> Dear R-users,
>
> In R 2.5.1 on Windows XP, SP2 the call to 
> phyper(0,0,74,3,lower.tail=FALSE) returns -4.195862e-17. This does not 
> happen with R2.5.1 on Linux, 0 is returned. Is this a bug (and should be 
> reported as such), since phyper should not return negative values, or is 
> this considered as one of the annoyances of finite precision arithmetic. 
> I tend to think of this as a bug since it breaks the assumption 
> phyper()>=0.
You are specifically asked to try out the latest version before calling 
'bug' (in the R FAQ, in the R posting guide ...).
R version 2.6.0 RC (2007-10-01 r43049)
...
> phyper(0,0,74,3,lower.tail=FALSE)
[1] 0
on Windows.
-- 
Brian D. Ripley,                  ripley at 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 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595
    
    
More information about the R-help
mailing list