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