- using R version 4.3.2 (2023-10-31 ucrt)
- using platform: x86_64-w64-mingw32 (64-bit)
- R was compiled by
gcc.exe (GCC) 12.3.0
GNU Fortran (GCC) 12.3.0
- running under: Windows Server 2022 x64 (build 20348)
- using session charset: UTF-8
- checking for file 'Rmpfr/DESCRIPTION' ... OK
- checking extension type ... Package
- this is package 'Rmpfr' version '0.9-3'
- 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
See the install log for details.
- used C compiler: 'gcc.exe (GCC) 12.3.0'
- 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
- checking whether the package can be loaded ... [1s] OK
- checking whether the package can be loaded with stated dependencies ... [1s] OK
- checking whether the package can be unloaded cleanly ... [1s] OK
- checking whether the namespace can be loaded with stated dependencies ... [1s] OK
- checking whether the namespace can be unloaded cleanly ... [2s] OK
- checking loading without being on the library search path ... [1s] OK
- checking startup messages can be suppressed ... [1s] 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 ... [18s] OK
- checking Rd files ... [2s] 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 use of PKG_*FLAGS in Makefiles ... 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 ... [13s] ERROR
Running examples in 'Rmpfr-Ex.R' failed
The error most likely occurred in:
> ### Name: mpfr-utils
> ### Title: Rmpfr - Utilities for Precision Setting, Printing, etc
> ### Aliases: getPrec .getPrec getD mpfr_default_prec mpfr2array mpfrImport
> ### mpfrXport print.mpfr print.mpfrArray toNum .mpfr2list
> ### .mpfr_formatinfo .mpfr2exp .mpfr_erange .mpfr_erange_set
> ### .mpfr_erange_kinds .mpfr_erange_is_int .mpfr_maxPrec .mpfr_minPrec
> ### .mpfr_gmp_numbbits .mpfrVersion ..bigq2mpfr ..bigz2mpfr .getSign
> ### .mpfr_negative .mpfr_sign .mpfr .mpfr.
> ### Keywords: utilities
>
> ### ** Examples
>
> getPrec(as(c(1,pi), "mpfr")) # 128 for both
[1] 128 128
>
> (opr <- mpfr_default_prec()) ## typically 53, the MPFR system default
[1] 53
> stopifnot(opr == (oprec <- mpfr_default_prec(70)),
+ 70 == mpfr_default_prec())
> ## and reset it:
> mpfr_default_prec(opr)
[1] 70
>
> ## Explore behavior of rounding modes 'rnd.mode':
> x <- mpfr(10,99)^512 # too large for regular (double prec. / numeric):
> sapply(c("N", "D", "U", "Z", "A"), function(RM)
+ sapply(list(-x,x), function(.) toNum(., RM)))
N D U Z A
[1,] -Inf -Inf -1.797693e+308 -1.797693e+308 -Inf
[2,] Inf 1.797693e+308 Inf 1.797693e+308 Inf
> ## N D U Z A
> ## -Inf -Inf -1.797693e+308 -1.797693e+308 -Inf
> ## Inf 1.797693e+308 Inf 1.797693e+308 Inf
>
> ## Printing of "MPFR" matrices is less nice than R's usual matrix printing:
> m <- outer(c(1, 3.14, -1024.5678), c(1, 1e-3, 10,100))
> m[3,3] <- round(m[3,3])
> m
[,1] [,2] [,3] [,4]
[1,] 1.000 0.001000 10.0 100.0
[2,] 3.140 0.003140 31.4 314.0
[3,] -1024.568 -1.024568 -10246.0 -102456.8
> mpfr(m, 50)
'mpfrMatrix' of dim(.) = (3, 4) of precision 50 bits
[,1] [,2] [,3]
[1,] 1.0000000000000000 0.0010000000000000009 10.000000000000000
[2,] 3.1400000000000006 0.0031400000000000004 31.400000000000006
[3,] -1024.5678000000007 -1.0245677999999998 -10246.000000000000
[,4]
[1,] 100.00000000000000
[2,] 314.00000000000000
[3,] -102456.78000000003
>
> B6 <- mpfr2array(Bernoulli(1:6, 60), c(2,3),
+ dimnames = list(LETTERS[1:2], letters[1:3]))
> B6
'mpfrMatrix' of dim(.) = (2, 3) of precision 60 bits
a b c
A 0.50000000000000000000 -0. -0.
B 0.16666666666666666674 -0.033333333333333333359 0.023809523809523809557
>
> ## Ranges of (base 2) exponents of MPFR numbers:
> .mpfr_erange() # the currently active range of possible base 2 exponents:
Emin Emax
-1073741823 1073741823
>
> ## A factory fresh setting fulfills
> .mpfr_erange(c("Emin","Emax")) == c(-1,1) * (2^30 - 1)
Emin Emax
TRUE TRUE
>
> ## There are more 'kind's, the latter 4 showing how you could change the first two :
> .mpfr_erange_kinds
[1] "Emin" "Emax" "min.emin" "max.emin" "min.emax" "max.emax"
> .mpfr_erange(.mpfr_erange_kinds)
Emin Emax min.emin max.emin min.emax max.emax
-1073741823 1073741823 -1073741823 1073741823 -1073741823 1073741823
> eLimits <- .mpfr_erange(c("min.emin", "max.emin", "min.emax", "max.emax"))
> ## Typically true in "current" MPFR versions:
> eLimits == c(-1,1, -1,1) * (2^62 - 1)
min.emin max.emin min.emax max.emax
FALSE FALSE FALSE FALSE
>
>
> ## Looking at internal representation [for power users only!]:
>
> i8 <- mpfr(-2:5, 32)
> x4 <- mpfr(c(NA, NaN, -Inf, Inf), 32)
> ## The output of the following depends on the GMP "numb" size
> ## (32 bit vs. 64 bit), and may be even more platform specific:
> str( .mpfr2list(i8) )
List of 8
$ :List of 4
..$ prec: int 32
..$ exp : int [1:2] 2 0
..$ sign: int -1
..$ d : int [1:2] 0 NA
$ :List of 4
..$ prec: int 32
..$ exp : int [1:2] 1 0
..$ sign: int -1
..$ d : int [1:2] 0 NA
$ :List of 4
..$ prec: int 32
..$ exp : int [1:2] -2147483647 0
..$ sign: int 1
..$ d : int(0)
$ :List of 4
..$ prec: int 32
..$ exp : int [1:2] 1 0
..$ sign: int 1
..$ d : int [1:2] 0 NA
$ :List of 4
..$ prec: int 32
..$ exp : int [1:2] 2 0
..$ sign: int 1
..$ d : int [1:2] 0 NA
$ :List of 4
..$ prec: int 32
..$ exp : int [1:2] 2 0
..$ sign: int 1
..$ d : int [1:2] 0 -1073741824
$ :List of 4
..$ prec: int 32
..$ exp : int [1:2] 3 0
..$ sign: int 1
..$ d : int [1:2] 0 NA
$ :List of 4
..$ prec: int 32
..$ exp : int [1:2] 3 0
..$ sign: int 1
..$ d : int [1:2] 0 -1610612736
> str( .mpfr2list(x4, names = TRUE) )
List of 4
$ NaN :List of 4
..$ prec: int 32
..$ exp : int [1:2] -2147483646 0
..$ sign: int 1
..$ d : int(0)
$ NaN :List of 4
..$ prec: int 32
..$ exp : int [1:2] -2147483646 0
..$ sign: int 1
..$ d : int(0)
$ -Inf:List of 4
..$ prec: int 32
..$ exp : int [1:2] -2147483645 0
..$ sign: int -1
..$ d : int(0)
$ Inf :List of 4
..$ prec: int 32
..$ exp : int [1:2] -2147483645 0
..$ sign: int 1
..$ d : int(0)
>
> str(xp4 <- mpfrXport(x4, names = TRUE))
List of 5
$ gmp.numb.bits: int 64
$ mpfr.version : chr "4.2.1"
$ Machine :List of 5
..$ sizeof.long : int 4
..$ sizeof.longlong : int 8
..$ sizeof.longdouble: int 16
..$ sizeof.pointer : int 8
..$ sizeof.time_t : int 8
$ Sys.info : Named chr [1:2] "Windows" "x86-64"
..- attr(*, "names")= chr [1:2] "sysname" "machine"
$ mpfr :List of 4
..$ NaN :List of 4
.. ..$ prec: int 32
.. ..$ exp : int [1:2] -2147483646 0
.. ..$ sign: int 1
.. ..$ d : int(0)
..$ NaN :List of 4
.. ..$ prec: int 32
.. ..$ exp : int [1:2] -2147483646 0
.. ..$ sign: int 1
.. ..$ d : int(0)
..$ -Inf:List of 4
.. ..$ prec: int 32
.. ..$ exp : int [1:2] -2147483645 0
.. ..$ sign: int -1
.. ..$ d : int(0)
..$ Inf :List of 4
.. ..$ prec: int 32
.. ..$ exp : int [1:2] -2147483645 0
.. ..$ sign: int 1
.. ..$ d : int(0)
- attr(*, "class")= chr "mpfrXport"
> stopifnot(identical(x4, mpfrImport(mpfrXport(x4))),
+ identical(i8, mpfrImport(mpfrXport(i8))))
Error in validObject(.Object) :
invalid class "mpfr1" object: 'exp' slot invalid for non-regular number (64b, length(d) == 0)
Calls: stopifnot ... <Anonymous> -> initialize -> initialize -> validObject
Execution halted
- checking for unstated dependencies in 'tests' ... OK
- checking tests ... [54s] ERROR
Running 'arith-ex.R' [7s]
Running 'binomial-etc.R' [2s]
Running 'bit-repr.R' [1s]
Comparing 'bit-repr.Rout' to 'bit-repr.Rout.save' ... OK
Running 'create.R' [2s]
Running 'functionals.R' [18s]
Running 'lowlevel.R' [1s]
Running 'matrix-ex.R' [2s]
Running 'special-fun-ex.R' [18s]
Running 'tstHexBin.R' [2s]
Running the tests in 'tests/lowlevel.R' failed.
Complete output:
> #### Low level stuff - debugging etc
> #### ========= =========
>
> require("Rmpfr")
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, dt, pnorm
The following objects are masked from 'package:base':
cbind, pmax, pmin, rbind
> options(warn = 2)# warning -> error
>
> identical3 <- function(x,y,z) identical(x,y) && identical (y,z)
> identical4 <- function(a,b,c,d) identical(a,b) && identical3(b,c,d)
>
> ## sane state [when re-source()ing this file]:
> .mpfr_erange_set("Emin", -(2^30-1))
> .mpfr_erange_set("Emax", +(2^30-1))
>
> ###----- _1_ mpfr1 , import, xport etc -----------------------------------------
> i8 <- mpfr(-2:5, 32)
> x4 <- mpfr(c(NA, NaN, -Inf, Inf), 32); x4 # NA -> NaN as well
4 'mpfr' numbers of precision 32 bits
[1] NaN NaN -Inf Inf
> stopifnot(identical3(is.na(x4), is.nan(x4), c(T,T,F,F)))
>
> o1 <- as(x4[1], "mpfr1")
> stopifnot(is(o1, "mpfr1")) # failed previously
> validObject(o1) # ditto (failed on 64-bit only)
Error in validObject(o1) :
invalid class "mpfr1" object: 'exp' slot invalid for non-regular number (64b, length(d) == 0)
Execution halted
- checking for unstated dependencies in vignettes ... OK
- checking package vignettes in 'inst/doc' ... OK
- checking re-building of vignette outputs ... [69s] OK
- checking PDF version of manual ... [22s] OK
- checking HTML version of manual ... [12s] OK
- DONE
Status: 2 ERRORs