[Rd] Incorrect values in non-central chisq values on Linux (PR#881)

ripley@stats.ox.ac.uk ripley@stats.ox.ac.uk
Wed, 21 Mar 2001 18:21:55 +0100 (MET)


On the system below

dchisq(7.2, df=2,ncp=20)
[1] 0.00804528

Solaris 2.7 gives

[1] 0.01175302

which is correct, as can be seen from

x<-seq(0,50,.1)
y<-x
for(i in 1:length(x)){
   y[i]<-dchisq(x[i],df=2,ncp=20)}

plot(x,y,typ="l")

The problem is that q in dnchisq.c can be 1, and then errorbound
should be Inf. It is on Solaris, but -105822722841527.296875 on Linux
(so it has been evaluated q to greater than one).

I am about to commit a patch for 1.2.3.


--please do not edit the information below--

Version:
 platform = i686-pc-linux-gnu
 arch = i686
 os = linux-gnu
 system = i686, linux-gnu
 status =
 major = 1
 minor = 2.2
 year = 2001
 month = 02
 day = 26
 language = R

Search Path:
 .GlobalEnv, package:ctest, Autoloads, package:base

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