From jross at openvistas.net  Wed Sep 28 00:48:33 2005
From: jross at openvistas.net (Jeff Ross)
Date: Tue, 27 Sep 2005 16:48:33 -0600 (MDT)
Subject: [Rd] Make test fails in d-p-q-r-tests...
Message-ID: <Pine.BSO.4.63.0509271638560.9423@heinlein.openvistas.net>

Hi,

R-2.1.1, R-patched, and the latest R-beta--all fail with same error

OS:  OpenBSD-current (3.8) on i386
Compiler:gcc version 3.3.5 (propolice)
Thread model: single

configure \
    --with-readline \
    --with-tcltk \
    --with-tcl-config=/usr/local/lib/tcl8.4/tclConfig.sh \
    --with-tk-config=/usr/local/lib/tk8.4/tkConfig.sh \
    --with-libpng \
    --with-jpeglib \
    --with-zlib \
    --with-bzlib \
    --with-pcre \
    --with-libiconv-prefix=/usr/local/

Here's the last bit what make check FORCE=FORCE outputs:

running code in 'grDevices-Ex.R' ... OK
comparing 'grDevices-Ex.Rout' to 'grDevices-Ex.Rout.prev' ... OK
running code in 'graphics-Ex.R' ... OK
comparing 'graphics-Ex.Rout' to 'graphics-Ex.Rout.prev' ... OK
running code in 'stats-Ex.R' ... OK
comparing 'stats-Ex.Rout' to 'stats-Ex.Rout.prev' ... OK
running code in 'datasets-Ex.R' ... OK
comparing 'datasets-Ex.Rout' to 'datasets-Ex.Rout.prev' ... OK
running code in 'methods-Ex.R' ... OK
comparing 'methods-Ex.Rout' to 'methods-Ex.Rout.prev' ... OK
running code in 'grid-Ex.R' ... OK
comparing 'grid-Ex.Rout' to 'grid-Ex.Rout.prev' ... OK
running code in 'splines-Ex.R' ... OK
comparing 'splines-Ex.Rout' to 'splines-Ex.Rout.prev' ... OK
running code in 'stats4-Ex.R' ... OK
comparing 'stats4-Ex.Rout' to 'stats4-Ex.Rout.prev' ... OK
running code in 'tcltk-Ex.R' ... OK
comparing 'tcltk-Ex.Rout' to 'tcltk-Ex.Rout.prev' ... OK
updating test dependencies
`Makedeps' is up to date.
running strict specific tests
running code in 'eval-etc.R' ... OK
comparing 'eval-etc.Rout' to './eval-etc.Rout.save' ... OK
running code in 'simple-true.R' ... OK
comparing 'simple-true.Rout' to './simple-true.Rout.save' ... OK
running code in 'arith-true.R' ... OK
comparing 'arith-true.Rout' to './arith-true.Rout.save' ... OK
running code in 'arith.R' ... OK
comparing 'arith.Rout' to './arith.Rout.save' ... OK
running code in 'lm-tests.R' ... OK
comparing 'lm-tests.Rout' to './lm-tests.Rout.save' ... OK
running code in 'primitive-funs.R' ... OK
comparing 'primitive-funs.Rout' to './primitive-funs.Rout.save' ... OK
running code in 'ok-errors.R' ... OK
comparing 'ok-errors.Rout' to './ok-errors.Rout.save' ... OK
running code in 'method-dispatch.R' ... OK
comparing 'method-dispatch.Rout' to './method-dispatch.Rout.save' ... OK
running code in 'd-p-q-r-tests.R' ...*** Error code 1
Stop in /usr/local/src/R-2.1.1/tests.
*** Error code 1

Here is the tail of d-p-q-r-tests.Rout.fail:

> ## for PR#7902:
> ex <- -c(rev(1/x), ex)
> All.eq(-x, qcauchy(pcauchy(-x)))
[1] TRUE
> All.eq(+x, qcauchy(pcauchy(+x, log=TRUE), log=TRUE))
[1] TRUE
> All.eq(1/x, pcauchy(qcauchy(1/x)))
[1] TRUE
> All.eq(ex,  pcauchy(qcauchy(ex, log=TRUE), log=TRUE))
[1] "`is.NA' value mismatches: 1 in current, 0  in target"
Warning message:
NaNs produced in: qcauchy(p, location, scale, lower.tail, log.p) 
> II <- c(-Inf,Inf)
> stopifnot(pcauchy(II) == 0:1, ## qcauchy(0:1) == II,
+           pcauchy(II, log=TRUE) == c(-Inf,0),
+           qcauchy(c(-Inf,0), log=TRUE) == II)
Error in if (!(is.logical(r <- eval(ll[[i]])) && all(r))) stop(paste(deparse(mc[[i +  :
  	missing value where TRUE/FALSE needed
In addition: Warning message:
NaNs produced in: qcauchy(p, location, scale, lower.tail, log.p) 
Execution halted

It was suggested to me over on the r-help list

On Tue, 27 Sep 2005, Prof Brian Ripley wrote:

> I am afraid this does look like a real problem, if a minor one. We have
for
> the first problem
>
> x <- 10^(ex <- c(1,2,5*(1:5),50,100,200,300,Inf))
> ex <- -c(rev(1/x), ex)
> qcauchy(ex, log=TRUE)
>
> The first entry of the result should be Inf and the last -Inf.  From the
> output you have shown us I would guess the last is NaN.
>
> If this is what is going on, it is a problem but a somewhat esoteric one
that
> probably reflects a lack of IEC60559 (aka IEEE754) conformance.  It 
needs
> more hands-on debugging than we can provide on a help list.


Anything I can do to help debug this?  I am not a C programmer, but I do 
have an interest in getting R running.


Jeff Ross



[Rd] Make test fails in d-p-q-r-tests...
Jeff Ross