- using R version 3.6.3 (2020-02-29)
- using platform: x86_64-w64-mingw32 (64-bit)
- using session charset: ISO8859-1
- checking for file 'Rmpfr/DESCRIPTION' ... OK
- checking extension type ... Package
- this is package 'Rmpfr' version '0.8-2'
- package encoding: UTF-8
- checking package namespace information ... OK
- checking package dependencies ... OK
- checking if this is a source package ... OK
- checking if there is a namespace ... OK
- checking for hidden files and directories ... OK
- checking for portable file names ... OK
- checking whether package 'Rmpfr' can be installed ... OK
- checking installed package size ... OK
- checking package directory ... OK
- checking 'build' directory ... OK
- checking DESCRIPTION meta-information ... OK
- checking top-level files ... OK
- checking for left-over files ... OK
- checking index information ... OK
- checking package subdirectories ... OK
- checking R files for non-ASCII characters ... OK
- checking R files for syntax errors ... OK
- loading checks for arch 'i386'
- checking whether the package can be loaded ... OK
- checking whether the package can be loaded with stated dependencies ... OK
- checking whether the package can be unloaded cleanly ... OK
- checking whether the namespace can be loaded with stated dependencies ... OK
- checking whether the namespace can be unloaded cleanly ... OK
- checking loading without being on the library search path ... OK
- checking use of S3 registration ... OK
- loading checks for arch 'x64'
- checking whether the package can be loaded ... OK
- checking whether the package can be loaded with stated dependencies ... OK
- checking whether the package can be unloaded cleanly ... OK
- checking whether the namespace can be loaded with stated dependencies ... OK
- checking whether the namespace can be unloaded cleanly ... OK
- checking loading without being on the library search path ... OK
- checking use of S3 registration ... OK
- checking dependencies in R code ... OK
- checking S3 generic/method consistency ... OK
- checking replacement functions ... OK
- checking foreign function calls ... OK
- checking R code for possible problems ... [14s] NOTE
cbind,Mnumber: no visible global function definition for 'deparse1'
rbind,Mnumber: no visible global function definition for 'deparse1'
Undefined global functions or variables:
deparse1
- checking Rd files ... OK
- checking Rd metadata ... OK
- checking Rd cross-references ... OK
- checking for missing documentation entries ... OK
- checking for code/documentation mismatches ... OK
- checking Rd \usage sections ... OK
- checking Rd contents ... OK
- checking for unstated dependencies in examples ... OK
- checking line endings in shell scripts ... OK
- checking line endings in C/C++/Fortran sources/headers ... OK
- checking line endings in Makefiles ... OK
- checking compilation flags in Makevars ... OK
- checking for GNU extensions in Makefiles ... OK
- checking for portable use of $(BLAS_LIBS) and $(LAPACK_LIBS) ... OK
- checking pragmas in C/C++ headers and code ... OK
- checking compiled code ... OK
- checking sizes of PDF files under 'inst/doc' ... OK
- checking installed files from 'inst/doc' ... OK
- checking files in 'vignettes' ... OK
- checking examples ...
- running examples for arch 'i386' ... ERROR
Running examples in 'Rmpfr-Ex.R' failed
The error most likely occurred in:
> ### Name: log1mexp
> ### Title: Compute f(a) = log(1 +/- exp(-a)) Numerically Optimally
> ### Aliases: log1pexp log1mexp
> ### Keywords: math
>
> ### ** Examples
>
> fExpr <- expression(
+ DEF = log(1 - exp(-a)),
+ expm1 = log(-expm1(-a)),
+ log1p = log1p(-exp(-a)),
+ F = log1mexp(a))
> a. <- 2^seq(-58, 10, length = 256)
> a <- a. ; str(fa <- do.call(cbind, as.list(fExpr)))
num [1:256, 1:4] -Inf -Inf -Inf -Inf -Inf ...
- attr(*, "dimnames")=List of 2
..$ : NULL
..$ : chr [1:4] "DEF" "expm1" "log1p" "F"
> head(fa)# expm1() works here
DEF expm1 log1p F
[1,] -Inf -40.20254 -Inf -40.20254
[2,] -Inf -40.01770 -Inf -40.01770
[3,] -Inf -39.83286 -Inf -39.83286
[4,] -Inf -39.64802 -Inf -39.64802
[5,] -Inf -39.46318 -Inf -39.46318
[6,] -Inf -39.27834 -Inf -39.27834
> tail(fa)# log1p() works here
DEF expm1 log1p F
[251,] 0 0 -3.263800e-177 -3.263800e-177
[252,] 0 0 -4.814940e-213 -4.814940e-213
[253,] 0 0 -3.774342e-256 -3.774342e-256
[254,] 0 0 -5.242582e-308 -5.242582e-308
[255,] 0 0 0.000000e+00 0.000000e+00
[256,] 0 0 0.000000e+00 0.000000e+00
>
> ## graphically:
> lwd <- 1.5*(5:2); col <- adjustcolor(1:4, 0.4)
> op <- par(mfcol=c(1,2), mgp = c(1.25, .6, 0), mar = .1+c(3,2,1,1))
> matplot(a, fa, type = "l", log = "x", col=col, lwd=lwd)
> legend("topleft", fExpr, col=col, lwd=lwd, lty=1:4, bty="n")
> # expm1() & log1mexp() work here
>
> matplot(a, -fa, type = "l", log = "xy", col=col, lwd=lwd)
Warning in xy.coords(x, y, xlabel, ylabel, log = log) :
40 y values <= 0 omitted from logarithmic plot
Warning in xy.coords(x, y, xlabel, ylabel, log) :
18 y values <= 0 omitted from logarithmic plot
> legend("left", paste("-",fExpr), col=col, lwd=lwd, lty=1:4, bty="n")
> # log1p() & log1mexp() work here
> par(op)
>
> aM <- 2^seqMpfr(-58, 10, length=length(a.)) # => default prec = 128
> a <- aM; dim(faM <- do.call(cbind, as.list(fExpr))) # 256 x 4, "same" as 'fa'
[1] 256 4
> ## Here, for small 'a' log1p() and even 'DEF' is still good enough
> l_f <- asNumeric(log(-faM))
> all.equal(l_f[,"F"], l_f[,"log1p"], tol=0) # see TRUE (Lnx 64-bit)
[1] TRUE
> io <- a. < 80 # for these, the differences are small
> all.equal(l_f[io,"F"], l_f[io,"expm1"], tol=0) # see 6.662e-9
[1] "Mean relative difference: 6.622392e-09"
> all.equal(l_f[io,"F"], l_f[io, "DEF" ], tol=0)
[1] "Mean relative difference: 6.622392e-09"
> stopifnot(exprs = {
+ all.equal(l_f[,"F"], l_f[,"log1p"], tol= 1e-15)
+ all.equal(l_f[io,"F"], l_f[io,"expm1"], tol= 1e-7)
+ all.equal(l_f[io,"F"], l_f[io, "DEF" ], tol= 1e-7)
+ })
> ## For 128-bit prec, if we go down to 2^-130, "log1p" is no longer ok:
> aM2 <- 2^seqMpfr(-130, 10, by = 1/2)
> a <- aM2; fa2 <- do.call(cbind, as.list(fExpr))
> head(asNumeric(fa2), 12)
DEF expm1 log1p F
[1,] -Inf -90.10913 -Inf -90.10913
[2,] -Inf -89.76256 -Inf -89.76256
[3,] -Inf -89.41599 -Inf -89.41599
[4,] -88.72284 -89.06941 -88.72284 -89.06941
[5,] -88.72284 -88.72284 -88.72284 -88.72284
[6,] -88.72284 -88.37627 -88.72284 -88.37627
[7,] -88.02969 -88.02969 -88.02969 -88.02969
[8,] -87.62423 -87.68312 -87.62423 -87.68312
[9,] -87.33654 -87.33654 -87.33654 -87.33654
[10,] -86.93108 -86.98997 -86.93108 -86.98997
[11,] -86.64340 -86.64340 -86.64340 -86.64340
[12,] -86.32494 -86.29682 -86.32494 -86.29682
> tail(asNumeric(fa2), 12)
DEF expm1 log1p F
[270,] -1.489490e-10 -1.489490e-10 -1.489490e-10 -1.489490e-10
[271,] -1.266417e-14 -1.266417e-14 -1.266417e-14 -1.266417e-14
[272,] -2.218581e-20 -2.218581e-20 -2.218581e-20 -2.218581e-20
[273,] -1.603811e-28 -1.603811e-28 -1.603811e-28 -1.603811e-28
[274,] 0.000000e+00 0.000000e+00 -4.922102e-40 -4.922102e-40
[275,] 0.000000e+00 0.000000e+00 -2.572209e-56 -2.572209e-56
[276,] 0.000000e+00 0.000000e+00 -2.422709e-79 -2.422709e-79
[277,] 0.000000e+00 0.000000e+00 -6.616261e-112 -6.616261e-112
[278,] 0.000000e+00 0.000000e+00 -5.869519e-158 -5.869519e-158
[279,] 0.000000e+00 0.000000e+00 -4.377491e-223 -4.377491e-223
[280,] 0.000000e+00 0.000000e+00 -3.445126e-315 -3.445126e-315
[281,] 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00
>
> matplot(a, log(-fa2[,1:3]) -log(-fa2[,"F"]), type="l", log="x",
+ lty=1:3, lwd=2*(3:1)-1, col=adjustcolor(2:4, 1/3))
Error in xy.coords(x, y, xlabel, ylabel, log = log) :
'list' object cannot be coerced to type 'double'
Calls: matplot -> xy.coords
Execution halted
- running examples for arch 'x64' ... ERROR
Running examples in 'Rmpfr-Ex.R' failed
The error most likely occurred in:
> ### Name: log1mexp
> ### Title: Compute f(a) = log(1 +/- exp(-a)) Numerically Optimally
> ### Aliases: log1pexp log1mexp
> ### Keywords: math
>
> ### ** Examples
>
> fExpr <- expression(
+ DEF = log(1 - exp(-a)),
+ expm1 = log(-expm1(-a)),
+ log1p = log1p(-exp(-a)),
+ F = log1mexp(a))
> a. <- 2^seq(-58, 10, length = 256)
> a <- a. ; str(fa <- do.call(cbind, as.list(fExpr)))
num [1:256, 1:4] -Inf -Inf -Inf -Inf -Inf ...
- attr(*, "dimnames")=List of 2
..$ : NULL
..$ : chr [1:4] "DEF" "expm1" "log1p" "F"
> head(fa)# expm1() works here
DEF expm1 log1p F
[1,] -Inf -40.20254 -Inf -40.20254
[2,] -Inf -40.01770 -Inf -40.01770
[3,] -Inf -39.83286 -Inf -39.83286
[4,] -Inf -39.64802 -Inf -39.64802
[5,] -Inf -39.46318 -Inf -39.46318
[6,] -Inf -39.27834 -Inf -39.27834
> tail(fa)# log1p() works here
DEF expm1 log1p F
[251,] 0 0 -3.263800e-177 -3.263800e-177
[252,] 0 0 -4.814940e-213 -4.814940e-213
[253,] 0 0 -3.774342e-256 -3.774342e-256
[254,] 0 0 -5.242582e-308 -5.242582e-308
[255,] 0 0 0.000000e+00 0.000000e+00
[256,] 0 0 0.000000e+00 0.000000e+00
>
> ## graphically:
> lwd <- 1.5*(5:2); col <- adjustcolor(1:4, 0.4)
> op <- par(mfcol=c(1,2), mgp = c(1.25, .6, 0), mar = .1+c(3,2,1,1))
> matplot(a, fa, type = "l", log = "x", col=col, lwd=lwd)
> legend("topleft", fExpr, col=col, lwd=lwd, lty=1:4, bty="n")
> # expm1() & log1mexp() work here
>
> matplot(a, -fa, type = "l", log = "xy", col=col, lwd=lwd)
Warning in xy.coords(x, y, xlabel, ylabel, log = log) :
40 y values <= 0 omitted from logarithmic plot
Warning in xy.coords(x, y, xlabel, ylabel, log) :
18 y values <= 0 omitted from logarithmic plot
> legend("left", paste("-",fExpr), col=col, lwd=lwd, lty=1:4, bty="n")
> # log1p() & log1mexp() work here
> par(op)
>
> aM <- 2^seqMpfr(-58, 10, length=length(a.)) # => default prec = 128
> a <- aM; dim(faM <- do.call(cbind, as.list(fExpr))) # 256 x 4, "same" as 'fa'
[1] 256 4
> ## Here, for small 'a' log1p() and even 'DEF' is still good enough
> l_f <- asNumeric(log(-faM))
> all.equal(l_f[,"F"], l_f[,"log1p"], tol=0) # see TRUE (Lnx 64-bit)
[1] TRUE
> io <- a. < 80 # for these, the differences are small
> all.equal(l_f[io,"F"], l_f[io,"expm1"], tol=0) # see 6.662e-9
[1] "Mean relative difference: 6.622392e-09"
> all.equal(l_f[io,"F"], l_f[io, "DEF" ], tol=0)
[1] "Mean relative difference: 6.622392e-09"
> stopifnot(exprs = {
+ all.equal(l_f[,"F"], l_f[,"log1p"], tol= 1e-15)
+ all.equal(l_f[io,"F"], l_f[io,"expm1"], tol= 1e-7)
+ all.equal(l_f[io,"F"], l_f[io, "DEF" ], tol= 1e-7)
+ })
> ## For 128-bit prec, if we go down to 2^-130, "log1p" is no longer ok:
> aM2 <- 2^seqMpfr(-130, 10, by = 1/2)
> a <- aM2; fa2 <- do.call(cbind, as.list(fExpr))
> head(asNumeric(fa2), 12)
DEF expm1 log1p F
[1,] -Inf -90.10913 -Inf -90.10913
[2,] -Inf -89.76256 -Inf -89.76256
[3,] -Inf -89.41599 -Inf -89.41599
[4,] -88.72284 -89.06941 -88.72284 -89.06941
[5,] -88.72284 -88.72284 -88.72284 -88.72284
[6,] -88.72284 -88.37627 -88.72284 -88.37627
[7,] -88.02969 -88.02969 -88.02969 -88.02969
[8,] -87.62423 -87.68312 -87.62423 -87.68312
[9,] -87.33654 -87.33654 -87.33654 -87.33654
[10,] -86.93108 -86.98997 -86.93108 -86.98997
[11,] -86.64340 -86.64340 -86.64340 -86.64340
[12,] -86.32494 -86.29682 -86.32494 -86.29682
> tail(asNumeric(fa2), 12)
DEF expm1 log1p F
[270,] -1.489490e-10 -1.489490e-10 -1.489490e-10 -1.489490e-10
[271,] -1.266417e-14 -1.266417e-14 -1.266417e-14 -1.266417e-14
[272,] -2.218581e-20 -2.218581e-20 -2.218581e-20 -2.218581e-20
[273,] -1.603811e-28 -1.603811e-28 -1.603811e-28 -1.603811e-28
[274,] 0.000000e+00 0.000000e+00 -4.922102e-40 -4.922102e-40
[275,] 0.000000e+00 0.000000e+00 -2.572209e-56 -2.572209e-56
[276,] 0.000000e+00 0.000000e+00 -2.422709e-79 -2.422709e-79
[277,] 0.000000e+00 0.000000e+00 -6.616261e-112 -6.616261e-112
[278,] 0.000000e+00 0.000000e+00 -5.869519e-158 -5.869519e-158
[279,] 0.000000e+00 0.000000e+00 -4.377491e-223 -4.377491e-223
[280,] 0.000000e+00 0.000000e+00 -3.445126e-315 -3.445126e-315
[281,] 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00
>
> matplot(a, log(-fa2[,1:3]) -log(-fa2[,"F"]), type="l", log="x",
+ lty=1:3, lwd=2*(3:1)-1, col=adjustcolor(2:4, 1/3))
Error in xy.coords(x, y, xlabel, ylabel, log = log) :
'list' object cannot be coerced to type 'double'
Calls: matplot -> xy.coords
Execution halted
- checking for unstated dependencies in 'tests' ... OK
- checking tests ...
- running tests for arch 'i386' ... [44s] OK
Running 'arith-ex.R' [6s]
Running 'binomial-etc.R' [1s]
Running 'bit-repr.R' [1s]
Comparing 'bit-repr.Rout' to 'bit-repr.Rout.save' ... OK
Running 'create.R' [2s]
Running 'functionals.R' [17s]
Running 'lowlevel.R' [1s]
Running 'matrix-ex.R' [3s]
Running 'special-fun-ex.R' [12s]
Running 'tstHexBin.R' [1s]
- running tests for arch 'x64' ... [46s] OK
Running 'arith-ex.R' [6s]
Running 'binomial-etc.R' [1s]
Running 'bit-repr.R' [2s]
Comparing 'bit-repr.Rout' to 'bit-repr.Rout.save' ... OK
Running 'create.R' [2s]
Running 'functionals.R' [18s]
Running 'lowlevel.R' [2s]
Running 'matrix-ex.R' [3s]
Running 'special-fun-ex.R' [10s]
Running 'tstHexBin.R' [1s]
- checking for unstated dependencies in vignettes ... OK
- checking package vignettes in 'inst/doc' ... OK
- checking re-building of vignette outputs ... [26s] WARNING
Error(s) in re-building vignettes:
--- re-building 'Maechler_useR_2011-abstr.Rnw' using Sweave
Loading required package: Rmpfr
Loading required package: gmp
Attaching package: 'gmp'
The following objects are masked from 'package:base':
%*%, apply, crossprod, matrix, tcrossprod
C code of R package 'Rmpfr': GMP using 64 bits per limb
Attaching package: 'Rmpfr'
The following object is masked from 'package:gmp':
outer
The following objects are masked from 'package:stats':
dbinom, dgamma, dnbinom, dnorm, dpois, pnorm
The following objects are masked from 'package:base':
cbind, pmax, pmin, rbind
--- finished re-building 'Maechler_useR_2011-abstr.Rnw'
--- re-building 'Rmpfr-pkg.Rnw' using Sweave
Loading required package: sfsmisc
Loading required package: Rmpfr
Loading required package: gmp
Attaching package: 'gmp'
The following objects are masked from 'package:sfsmisc':
factorize, is.whole
The following objects are masked from 'package:base':
%*%, apply, crossprod, matrix, tcrossprod
C code of R package 'Rmpfr': GMP using 64 bits per limb
Attaching package: 'Rmpfr'
The following object is masked from 'package:gmp':
outer
The following objects are masked from 'package:stats':
dbinom, dgamma, dnbinom, dnorm, dpois, pnorm
The following objects are masked from 'package:base':
cbind, pmax, pmin, rbind
Error: processing vignette 'Rmpfr-pkg.Rnw' failed with diagnostics:
chunk 23 (label = format-lrg)
Error in deparse1(a) : could not find function "deparse1"
--- failed re-building 'Rmpfr-pkg.Rnw'
--- re-building 'log1mexp-note.Rnw' using Sweave
Loading required package: gmp
Attaching package: `gmp'
The following objects are masked from `package:sfsmisc':
factorize, is.whole
The following objects are masked from `package:base':
%*%, apply, crossprod, matrix, tcrossprod
C code of R package 'Rmpfr': GMP using 64 bits per limb
Attaching package: `Rmpfr'
The following object is masked from `package:gmp':
outer
The following objects are masked from `package:stats':
dbinom, dgamma, dnbinom, dnorm, dpois, pnorm
The following objects are masked from `package:base':
cbind, pmax, pmin, rbind
!!! Error: Too many files!
PDFCROP 1.38, 2012/11/02 - Copyright (c) 2002-2012 by Heiko Oberdiek.
!!! Error: Too many files!
PDFCROP 1.38, 2012/11/02 - Copyright (c) 2002-2012 by Heiko Oberdiek.
!!! Error: Too many files!
PDFCROP 1.38, 2012/11/02 - Copyright (c) 2002-2012 by Heiko Oberdiek.
!!! Error: Too many files!
PDFCROP 1.38, 2012/11/02 - Copyright (c) 2002-2012 by Heiko Oberdiek.
--- finished re-building 'log1mexp-note.Rnw'
SUMMARY: processing the following file failed:
'Rmpfr-pkg.Rnw'
Error: Vignette re-building failed.
Execution halted
- checking PDF version of manual ... OK
- DONE
Status: 2 ERRORs, 1 WARNING, 1 NOTE