[R-SIG-Mac] Problem R-4.0 beta and Rmpfr (pre-release)

Berend Hasselman bhh @end|ng |rom x@4@||@n|
Thu Apr 16 08:56:31 CEST 2020

If the pre-release binary of Rmpfr is intended for the R-4.0 beta then I am experiencing "illegal operations" with "illegal opcode" errors.


R version 4.0.0 beta (2020-04-14 r78227)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Catalina 10.15.4

Matrix products: default
BLAS:   /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRblas.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib

[1] en_IE.UTF-8/en_IE.UTF-8/en_IE.UTF-8/C/en_IE.UTF-8/en_IE.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] compiler_4.0.0


A simple example session is


> library(gmp,lib.loc=".");library(Rmpfr,lib.loc=".")

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':


The following objects are masked from 'package:stats':

    dbinom, dgamma, dnorm, dpois, pnorm

The following objects are masked from 'package:base':

    cbind, pmax, pmin, rbind

> x <- 1400+ 0:10
> print(dpois(x, 1000), digits =18) ## standard R's double precision
 [1] 1.46677334419659338e-33 1.04694742626454156e-33 7.46752800474106016e-34
 [4] 5.32254312525935864e-34 3.79098513195210765e-34 2.69821005832831136e-34
 [7] 1.91906832029070091e-34 1.36394336907638670e-34 9.68709779173582432e-35
[10] 6.87515812046484244e-35 4.87599866699657026e-35
> dpois(mpfr(x, 120), 1000)## more accuracy for the same

 *** caught illegal operation ***
address 0x10a6e1c42, cause 'illegal opcode'

 1: .class1(object)
 2: as(value, dataClass)
 3: setDataPart(x, .Call(Math_mpfr, x, .Math.codes[[.Generic]]))
 4: exp(-lambda)
 5: exp(-lambda)
 6: dpois(mpfr(x, 120), 1000)

Possible actions:
1: abort (with core dump, if enabled)
2: normal R exit
3: exit R without saving workspace
4: exit R saving workspace


Other trials seem to experience similar issues.



More information about the R-SIG-Mac mailing list