CRAN Package Check Results for Package Rmpfr

Last updated on 2021-05-07 19:49:29 CEST.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 0.8-4 20.95 186.94 207.89 OK
r-devel-linux-x86_64-debian-gcc 0.8-4 16.58 141.20 157.78 OK
r-devel-linux-x86_64-fedora-clang 0.8-4 278.35 OK
r-devel-linux-x86_64-fedora-gcc 0.8-4 249.61 OK
r-devel-windows-ix86+x86_64 0.8-4 30.00 248.00 278.00 OK
r-devel-windows-x86_64-gcc10-UCRT 0.8-4 OK
r-patched-linux-x86_64 0.8-4 21.31 181.43 202.74 OK
r-patched-solaris-x86 0.8-4 310.50 OK
r-release-linux-x86_64 0.8-4 18.65 178.07 196.72 OK
r-release-macos-x86_64 0.8-4 OK
r-release-windows-ix86+x86_64 0.8-4 35.00 256.00 291.00 OK
r-oldrel-macos-x86_64 0.8-4 ERROR
r-oldrel-windows-ix86+x86_64 0.8-4 39.00 13.00 52.00 ERROR

Check Details

Version: 0.8-4
Check: examples
Result: 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
Flavor: r-oldrel-macos-x86_64

Version: 0.8-4
Check: whether package can be installed
Result: ERROR
    Installation failed.
    See for details.
    *
Flavor: r-oldrel-windows-ix86+x86_64