R Under development (unstable) (2026-02-18 r89435 ucrt) -- "Unsuffered Consequences"
Copyright (C) 2026 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> ## Copyright (C) 2012 Marius Hofert, Ivan Kojadinovic, Martin Maechler, and Jun Yan
> ##
> ## This program is free software; you can redistribute it and/or modify it under
> ## the terms of the GNU General Public License as published by the Free Software
> ## Foundation; either version 3 of the License, or (at your option) any later
> ## version.
> ##
> ## This program is distributed in the hope that it will be useful, but WITHOUT
> ## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
> ## FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
> ## details.
> ##
> ## You should have received a copy of the GNU General Public License along with
> ## this program; if not, see .
>
> ## MM --- addition: to be put into /tests/*.R
> ## --- diagnose the .libPaths setup and why the wrong lme4 is found ...
> (.lP <- .libPaths())
[1] "D:/temp/2026_02_20_12_40_16_3814/RtmpQbuWYw/RLIBS_619834372417"
[2] "D:/RCompile/recent/R/library"
> (.ip <- installed.packages(lib.loc = .lP[1]))[,c("Version", "Priority", "Built")]
Version Priority
ADGofTest "0.3" NA
DistributionUtils "0.6-2" NA
FNN "1.1.4.1" NA
GeneralizedHyperbolic "0.8-7" NA
HAC "1.1-2" NA
R6 "2.6.1" NA
Rcpp "1.1.1" NA
RcppArmadillo "15.2.3-1" NA
Rdpack "2.6.6" NA
Rmpfr "1.1-2" NA
Rsolnp "2.0.1" NA
Runuran "0.41" NA
SkewHyperbolic "0.4-2" NA
TTR "0.24.4" NA
VGAM "1.1-14" NA
VineCopula "2.6.1" NA
abind "1.4-8" NA
alabama "2025.1.0" NA
animation "2.8" NA
base64enc "0.1-6" NA
bbmle "1.0.25.1" NA
bdsmatrix "1.3-7" NA
bslib "0.10.0" NA
cachem "1.1.0" NA
chron "2.3-62" NA
cli "3.6.5" NA
colorspace "2.1-2" NA
copula "1.1-7" NA
crop "0.0-3" NA
curl "7.0.0" NA
digest "0.6.39" NA
evaluate "1.0.5" NA
fastmap "1.2.0" NA
fontawesome "0.5.3" NA
fracdiff "1.5-3" NA
fs "1.6.6" NA
future "1.69.0" NA
future.apply "1.20.2" NA
globals "0.19.0" NA
glue "1.8.0" NA
gmp "0.7-5.1" NA
gridExtra "2.3" NA
gsl "2.1-9" NA
gtable "0.3.6" NA
highr "0.11" NA
htmltools "0.5.9" NA
jquerylib "0.1.4" NA
jsonlite "2.0.0" NA
kernlab "0.9-33" NA
knitr "1.51" NA
ks "1.15.1" NA
lcopula "1.0.7" NA
lifecycle "1.0.5" NA
listenv "0.10.0" NA
magick "2.9.0" NA
magrittr "2.0.4" NA
mclust "6.1.2" NA
memoise "2.0.1" NA
mev "2.1" NA
mime "0.13" NA
multicool "1.0.1" NA
mvnormtest "0.1-9-3" NA
mvtnorm "1.3-3" NA
nleqslv "3.3.5" NA
nloptr "2.2.1" NA
numDeriv "2016.8-1.1" NA
parallelly "1.46.1" NA
partitions "1.10-9" NA
pcaPP "2.0-5" NA
polynom "1.4-1" NA
pracma "2.4.6" NA
pspline "1.0-21" NA
qrng "0.0-11" NA
quadprog "1.5-8" NA
quantmod "0.4.28" NA
randtoolbox "2.0.5" NA
rappdirs "0.3.4" NA
rbibutils "2.4.1" NA
rlang "1.1.7" NA
rmarkdown "2.30" NA
rngWELL "0.10-10" NA
rugarch "1.5-4" NA
sass "0.4.10" NA
scatterplot3d "0.3-44" NA
sets "1.0-25" NA
sfsmisc "1.1-23" NA
spd "2.0-1" NA
stabledist "0.7-2" NA
tinytex "0.58" NA
truncnorm "1.0-9" NA
tseries "0.10-60" NA
xfun "0.56" NA
xts "0.14.1" NA
yaml "2.3.12" NA
zoo "1.8-15" NA
Built
ADGofTest "R 4.6.0; ; 2026-02-19 01:44:28 UTC; windows"
DistributionUtils "R 4.6.0; x86_64-w64-mingw32; 2026-02-19 01:46:18 UTC; windows"
FNN "R 4.6.0; x86_64-w64-mingw32; 2026-02-19 01:46:03 UTC; windows"
GeneralizedHyperbolic "R 4.6.0; ; 2026-02-19 03:03:42 UTC; windows"
HAC "R 4.6.0; ; 2026-02-19 03:24:44 UTC; windows"
R6 "R 4.6.0; ; 2026-02-19 01:43:50 UTC; windows"
Rcpp "R 4.6.0; x86_64-w64-mingw32; 2026-02-19 01:43:57 UTC; windows"
RcppArmadillo "R 4.6.0; x86_64-w64-mingw32; 2026-02-19 03:03:30 UTC; windows"
Rdpack "R 4.6.0; ; 2026-02-19 03:03:33 UTC; windows"
Rmpfr "R 4.6.0; x86_64-w64-mingw32; 2026-02-19 03:04:22 UTC; windows"
Rsolnp "R 4.6.0; x86_64-w64-mingw32; 2026-02-19 03:59:04 UTC; windows"
Runuran "R 4.6.0; x86_64-w64-mingw32; 2026-02-19 01:57:45 UTC; windows"
SkewHyperbolic "R 4.6.0; ; 2026-02-19 03:19:24 UTC; windows"
TTR "R 4.6.0; x86_64-w64-mingw32; 2026-02-19 03:36:57 UTC; windows"
VGAM "R 4.6.0; x86_64-w64-mingw32; 2026-02-19 01:45:15 UTC; windows"
VineCopula "R 4.6.0; x86_64-w64-mingw32; 2026-02-19 01:51:58 UTC; windows"
abind "R 4.6.0; ; 2026-02-19 01:44:42 UTC; windows"
alabama "R 4.6.0; ; 2026-02-19 01:44:21 UTC; windows"
animation "R 4.6.0; ; 2026-02-19 03:04:29 UTC; windows"
base64enc "R 4.6.0; x86_64-w64-mingw32; 2026-02-19 01:43:51 UTC; windows"
bbmle "R 4.6.0; ; 2026-02-19 03:18:59 UTC; windows"
bdsmatrix "R 4.6.0; x86_64-w64-mingw32; 2026-02-19 01:45:10 UTC; windows"
bslib "R 4.6.0; ; 2026-02-19 03:36:53 UTC; windows"
cachem "R 4.6.0; x86_64-w64-mingw32; 2026-02-19 03:03:24 UTC; windows"
chron "R 4.6.0; x86_64-w64-mingw32; 2026-02-19 01:46:18 UTC; windows"
cli "R 4.6.0; x86_64-w64-mingw32; 2026-02-19 01:43:48 UTC; windows"
colorspace "R 4.6.0; x86_64-w64-mingw32; 2026-02-19 01:44:24 UTC; windows"
copula "R 4.6.0; x86_64-w64-mingw32; 2026-02-20 11:40:20 UTC; windows"
crop "R 4.6.0; ; 2026-02-19 02:27:12 UTC; windows"
curl "R 4.6.0; x86_64-w64-mingw32; 2026-02-19 01:44:02 UTC; windows"
digest "R 4.6.0; x86_64-w64-mingw32; 2026-02-19 01:43:50 UTC; windows"
evaluate "R 4.6.0; ; 2026-02-19 01:43:56 UTC; windows"
fastmap "R 4.6.0; x86_64-w64-mingw32; 2026-02-19 01:43:51 UTC; windows"
fontawesome "R 4.6.0; ; 2026-02-19 03:18:31 UTC; windows"
fracdiff "R 4.6.0; x86_64-w64-mingw32; 2026-02-19 01:44:24 UTC; windows"
fs "R 4.6.0; x86_64-w64-mingw32; 2026-02-19 01:43:54 UTC; windows"
future "R 4.6.0; ; 2026-02-19 03:18:35 UTC; windows"
future.apply "R 4.6.0; ; 2026-02-20 10:04:37 UTC; windows"
globals "R 4.6.0; ; 2026-02-19 03:03:24 UTC; windows"
glue "R 4.6.0; x86_64-w64-mingw32; 2026-02-19 01:43:49 UTC; windows"
gmp "R 4.6.0; x86_64-w64-mingw32; 2026-02-19 01:45:43 UTC; windows"
gridExtra "R 4.6.0; ; 2026-02-19 03:19:02 UTC; windows"
gsl "R 4.6.0; x86_64-w64-mingw32; 2026-02-19 01:46:52 UTC; windows"
gtable "R 4.6.0; ; 2026-02-19 03:18:28 UTC; windows"
highr "R 4.6.0; ; 2026-02-19 03:03:30 UTC; windows"
htmltools "R 4.6.0; x86_64-w64-mingw32; 2026-02-19 03:03:24 UTC; windows"
jquerylib "R 4.6.0; ; 2026-02-19 03:18:30 UTC; windows"
jsonlite "R 4.6.0; x86_64-w64-mingw32; 2026-02-19 01:43:53 UTC; windows"
kernlab "R 4.6.0; x86_64-w64-mingw32; 2026-02-19 01:43:51 UTC; windows"
knitr "R 4.6.0; ; 2026-02-19 03:18:41 UTC; windows"
ks "R 4.6.0; x86_64-w64-mingw32; 2026-02-19 03:37:21 UTC; windows"
lcopula "R 4.6.0; x86_64-w64-mingw32; 2026-02-19 03:33:26 UTC; windows"
lifecycle "R 4.6.0; ; 2026-02-19 03:03:24 UTC; windows"
listenv "R 4.6.0; ; 2026-02-19 01:43:51 UTC; windows"
magick "R 4.6.0; x86_64-w64-mingw32; 2026-02-19 01:53:20 UTC; windows"
magrittr "R 4.6.0; x86_64-w64-mingw32; 2026-02-19 01:43:48 UTC; windows"
mclust "R 4.6.0; x86_64-w64-mingw32; 2026-02-19 01:45:42 UTC; windows"
memoise "R 4.6.0; ; 2026-02-19 03:18:30 UTC; windows"
mev "R 4.6.0; x86_64-w64-mingw32; 2026-02-19 04:09:56 UTC; windows"
mime "R 4.6.0; x86_64-w64-mingw32; 2026-02-19 01:43:51 UTC; windows"
multicool "R 4.6.0; x86_64-w64-mingw32; 2026-02-19 01:46:18 UTC; windows"
mvnormtest "R 4.6.0; ; 2026-02-19 02:10:28 UTC; windows"
mvtnorm "R 4.6.0; x86_64-w64-mingw32; 2026-02-19 01:44:05 UTC; windows"
nleqslv "R 4.6.0; x86_64-w64-mingw32; 2026-02-19 01:44:48 UTC; windows"
nloptr "R 4.6.0; x86_64-w64-mingw32; 2026-02-19 01:44:24 UTC; windows"
numDeriv "R 4.6.0; ; 2026-02-19 01:43:51 UTC; windows"
parallelly "R 4.6.0; x86_64-w64-mingw32; 2026-02-19 01:43:54 UTC; windows"
partitions "R 4.6.0; x86_64-w64-mingw32; 2026-02-19 03:03:52 UTC; windows"
pcaPP "R 4.6.0; x86_64-w64-mingw32; 2026-02-19 01:46:59 UTC; windows"
polynom "R 4.6.0; ; 2026-02-19 01:45:43 UTC; windows"
pracma "R 4.6.0; ; 2026-02-19 01:46:20 UTC; windows"
pspline "R 4.6.0; x86_64-w64-mingw32; 2026-02-19 01:49:54 UTC; windows"
qrng "R 4.6.0; x86_64-w64-mingw32; 2026-02-19 01:46:13 UTC; windows"
quadprog "R 4.6.0; x86_64-w64-mingw32; 2026-02-19 01:44:51 UTC; windows"
quantmod "R 4.6.0; ; 2026-02-19 03:59:06 UTC; windows"
randtoolbox "R 4.6.0; x86_64-w64-mingw32; 2026-02-19 03:03:50 UTC; windows"
rappdirs "R 4.6.0; x86_64-w64-mingw32; 2026-02-19 01:43:50 UTC; windows"
rbibutils "R 4.6.0; x86_64-w64-mingw32; 2026-02-19 01:44:25 UTC; windows"
rlang "R 4.6.0; x86_64-w64-mingw32; 2026-02-19 01:43:51 UTC; windows"
rmarkdown "R 4.6.0; ; 2026-02-19 03:59:08 UTC; windows"
rngWELL "R 4.6.0; x86_64-w64-mingw32; 2026-02-19 01:46:27 UTC; windows"
rugarch "R 4.6.0; x86_64-w64-mingw32; 2026-02-19 04:16:19 UTC; windows"
sass "R 4.6.0; x86_64-w64-mingw32; 2026-02-19 03:18:30 UTC; windows"
scatterplot3d "R 4.6.0; ; 2026-02-19 01:46:24 UTC; windows"
sets "R 4.6.0; x86_64-w64-mingw32; 2026-02-19 01:47:37 UTC; windows"
sfsmisc "R 4.6.0; ; 2026-02-19 01:48:09 UTC; windows"
spd "R 4.6.0; ; 2026-02-19 01:46:18 UTC; windows"
stabledist "R 4.6.0; ; 2026-02-19 01:48:36 UTC; windows"
tinytex "R 4.6.0; ; 2026-02-19 03:03:32 UTC; windows"
truncnorm "R 4.6.0; x86_64-w64-mingw32; 2026-02-19 01:43:51 UTC; windows"
tseries "R 4.6.0; x86_64-w64-mingw32; 2026-02-19 04:16:07 UTC; windows"
xfun "R 4.6.0; x86_64-w64-mingw32; 2026-02-19 01:44:24 UTC; windows"
xts "R 4.6.0; x86_64-w64-mingw32; 2026-02-19 03:18:45 UTC; windows"
yaml "R 4.6.0; x86_64-w64-mingw32; 2026-02-19 01:44:24 UTC; windows"
zoo "R 4.6.0; x86_64-w64-mingw32; 2026-02-19 03:03:28 UTC; windows"
> ## (l.lme4 <- with(ll, results[results[,"Package"] == "lme4", , drop=FALSE]))
> ## sapply(l.lme4[,"LibPath"], function(lib) packageDescription("lme4", lib.loc=lib))
> sessionInfo()
R Under development (unstable) (2026-02-18 r89435 ucrt)
Platform: x86_64-w64-mingw32/x64
Running under: Windows Server 2022 x64 (build 20348)
Matrix products: default
LAPACK version 3.12.1
locale:
[1] LC_COLLATE=C LC_CTYPE=German_Germany.utf8
[3] LC_MONETARY=C LC_NUMERIC=C
[5] LC_TIME=C
time zone: Europe/Berlin
tzcode source: internal
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_4.6.0 tools_4.6.0
> ## ------ end{diagnose_libPaths}
>
> require(copula)
Loading required package: copula
> (isLinux <- identical("Linux", Sys.info()[["sysname"]]))
[1] FALSE
> (doExtras <- copula:::doExtras())
[1] FALSE
> sessionInfo()
R Under development (unstable) (2026-02-18 r89435 ucrt)
Platform: x86_64-w64-mingw32/x64
Running under: Windows Server 2022 x64 (build 20348)
Matrix products: default
LAPACK version 3.12.1
locale:
[1] LC_COLLATE=C LC_CTYPE=German_Germany.utf8
[3] LC_MONETARY=C LC_NUMERIC=C
[5] LC_TIME=C
time zone: Europe/Berlin
tzcode source: internal
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] copula_1.1-7
loaded via a namespace (and not attached):
[1] compiler_4.6.0 Matrix_1.7-4 ADGofTest_0.3
[4] tools_4.6.0 pspline_1.0-21 gsl_2.1-9
[7] mvtnorm_1.3-3 grid_4.6.0 pcaPP_2.0-5
[10] numDeriv_2016.8-1.1 stats4_4.6.0 cluster_2.1.8.2
[13] lattice_0.22-9 stabledist_0.7-2
>
> ## From source(system.file("test-tools-1.R", package = "Matrix")) :
> showSys.time <- function(expr) {
+ ## prepend 'Time' for R CMD Rdiff
+ st <- system.time(expr)
+ writeLines(paste("Time", capture.output(print(st))))
+ invisible(st)
+ }
>
> ### Stirling numbers of the 1st kind ###########################################
>
> S1.10 <- c(0, -362880, 1026576, -1172700, 723680,
+ -269325, 63273, -9450, 870, -45, 1)
> stopifnot(sapply(0:10, Stirling1, n=10) == S1.10,
+ Stirling1.all(10) == S1.10[-1])
>
> options(str = strOptions(vec.len = 10, digits.d = 20)) # for ls.str() below
>
> ls.str(copula:::.nacopEnv)
Bern.tab : list()
Eul.full.n : num 0
Eul.tab : list()
S1.full.n : num 10
S1.tab : List of 10
$ : num 1
$ : num [1:2] -1 1
$ : num [1:3] 2 -3 1
$ : num [1:4] -6 11 -6 1
$ : num [1:5] 24 -50 35 -10 1
$ : num [1:6] -120 274 -225 85 -15 1
$ : num [1:7] 720 -1764 1624 -735 175 -21 1
$ : num [1:8] -5040 13068 -13132 6769 -1960 322 -28 1
$ : num [1:9] 40320 -109584 118124 -67284 22449 -4536 546 -36 1
$ : num [1:10] -362880 1026576 -1172700 723680 -269325 63273 -9450 870 -45 1
S2.full.n : num 0
S2.tab : list()
> showSys.time(S <- Stirling1(30, 7))# updating table -> typically not zero
Time user system elapsed
Time 0 0 0
> showSys.time(S. <- Stirling1(30, 7))# lookup --> should be zero
Time user system elapsed
Time 0 0 0
> stopifnot(identical(S, S.))
>
> ls.str(copula:::.nacopEnv)
Bern.tab : list()
Eul.full.n : num 0
Eul.tab : list()
S1.full.n : num 10
S1.tab : List of 30
$ : num 1
$ : num [1:2] -1 1
$ : num [1:3] 2 -3 1
$ : num [1:4] -6 11 -6 1
$ : num [1:5] 24 -50 35 -10 1
$ : num [1:6] -120 274 -225 85 -15 1
$ : num [1:7] 720 -1764 1624 -735 175 -21 1
$ : num [1:8] -5040 13068 -13132 6769 -1960 322 -28 1
$ : num [1:9] 40320 -109584 118124 -67284 22449 -4536 546 -36 1
$ : num [1:10] -362880 1026576 -1172700 723680 -269325 63273 -9450 870 -45 1
$ : num [1:11] 3628800 -10628640 12753576 -8409500 3416930 -902055 157773 NA NA NA NA
$ : num [1:12] -39916800 120543840 -150917976 105258076 -45995730 13339535 -2637558 NA NA NA NA NA
$ : num [1:13] 479001600 -1486442880 1931559552 -1414014888 657206836 -206070150 44990231 NA NA NA NA NA NA
$ : num [1:14] -6227020800 19802759040 -26596717056 20313753096 -9957703756 3336118786 -790943153 NA NA NA NA NA ...
$ : num [1:15] 87178291200 -283465647360 392156797824 -310989260400 159721605680 -56663366760 14409322928 NA NA NA NA NA ...
$ : num [1:16] -1307674368000 4339163001600 -6165817614720 5056995703824 -2706813345600 1009672107080 -272803210680 NA NA NA NA NA ...
$ : num [1:17] 20922789888000 -70734282393600 102992244837120 -87077748875904 48366009233424 -18861567058880 5374523477960 NA NA NA NA NA ...
$ : num [1:18] -355687428096000 1223405590579200 -1821602444624640 1583313975727488 -909299905844112 369012649234384 -1102284661| __truncated__ ...
$ : num [1:19] 6402373705728000 -22376988058521600 34012249593822720 -30321254007719424 17950712280921504 -7551527592063024 2353| __truncated__ ...
$ : num [1:20] -121645100408832000 431565146817638400 -668609730341153280 610116075740491776 -371384787345228032 161429736530118| __truncated__ ...
$ : num [1:21] 2432902008176640000 -8752948036761600000 13803759753640704000 -12870931245150988288 8037811822645052416 -35999795| __truncated__ ...
$ : num [1:22] -51090942171709440000 186244810780170256384 -298631902863216410624 284093315901811458048 -181664979520697106432 8| __truncated__ ...
$ : num [1:23] 1124000727777607680000 -4148476779335455342422 6756146673770930635882 -6548684852703068684468 4280722865357148127| __truncated__ ...
$ : num [1:24] -25852016738884978212844 96538966652493089472062 -159539850276066841072420 157375898285941509328800 -105005310755| __truncated__ ...
$ : num [1:25] NA -2342787216398719066880266 3925495373278097342488426 -3936561409138662762882662 2677503356427960596806604 -132| __truncated__ ...
$ : num [1:26] NA NA -1.0048017154835114860e+26 1.0233953060174467286e+26 -7.0874145319837676608e+25 3.5770355645907608595e+25 -| __truncated__ ...
$ : num [1:27] NA NA NA -2.7613079671937127630e+27 1.9450673089175241960e+27 -1.0009033921134356117e+27 3.9317852931307364446e+2| __truncated__ ...
$ : num [1:28] NA NA NA NA -5.5278125307966864133e+28 2.8969458895980284752e+28 -1.1616723683566424906e+28 NA NA NA NA NA ...
$ : num [1:29] NA NA NA NA NA -8.6642297439541484600e+29 3.5423772203584016891e+29 NA NA NA NA NA ...
$ : num [1:30] NA NA NA NA NA NA -1.1139316913434780448e+31 NA NA NA NA NA ...
S2.full.n : num 0
S2.tab : list()
>
> showSys.time(s1c <- Stirling1(100,10))
Time user system elapsed
Time 0 0 0
> s1c
[1] 1.125272e+156
> ## no longer check the timings by default (s1 .. s4)
> (s1 <- system.time(for(i in 1:20) S. <- Stirling1(100, 10))[[1]])
[1] 0.01
> stopifnot(identical(S., s1c))
> if(doExtras && isLinux) stopifnot(s1 <= 0.020) # fails on valgrind / gctorture ..
> showSys.time(s2c <- Stirling1(200,190)); s2c
Time user system elapsed
Time 0.01 0.00 0.02
[1] 1.976591e+36
> (s2 <- system.time(for(i in 1:20) S. <- Stirling1(200,190))[[1]])
[1] 0
> stopifnot(identical(S., s2c))
> if(doExtras && isLinux) stopifnot(s2 <= 0.020)
> ## 0.010 occasionally barely fails (prints "0.010") on Martin's X201
>
>
> ### Stirling numbers of the 2nd kind ###########################################
>
> S2.10 <- c(0, 1, 511, 9330, 34105, 42525, 22827, 5880, 750, 45, 1)
> stopifnot(sapply(0:10, Stirling2, n=10, method="direct") == S2.10,
+ sapply(0:10, Stirling2, n=10, method="lookup") == S2.10,
+ Stirling2.all(10) == S2.10[-1])
>
> ls.str(copula:::.nacopEnv)
Bern.tab : list()
Eul.full.n : num 0
Eul.tab : list()
S1.full.n : num 10
S1.tab : List of 200
$ : num 1
$ : num [1:2] -1 1
$ : num [1:3] 2 -3 1
$ : num [1:4] -6 11 -6 1
$ : num [1:5] 24 -50 35 -10 1
$ : num [1:6] -120 274 -225 85 -15 1
$ : num [1:7] 720 -1764 1624 -735 175 -21 1
$ : num [1:8] -5040 13068 -13132 6769 -1960 322 -28 1
$ : num [1:9] 40320 -109584 118124 -67284 22449 -4536 546 -36 1
$ : num [1:10] -362880 1026576 -1172700 723680 -269325 63273 -9450 870 -45 1
$ : num [1:11] 3628800 -10628640 12753576 -8409500 3416930 -902055 157773 -18150 1320 -55 1
$ : num [1:12] -39916800 120543840 -150917976 105258076 -45995730 13339535 -2637558 357423 -32670 1925 -66 1
$ : num [1:13] 479001600 -1486442880 1931559552 -1414014888 657206836 -206070150 44990231 -6926634 749463 -55770 2717 -78 1
$ : num [1:14] -6227020800 19802759040 -26596717056 20313753096 -9957703756 3336118786 -790943153 135036473 -16669653 1474473 -91091 3731 ...
$ : num [1:15] 87178291200 -283465647360 392156797824 -310989260400 159721605680 -56663366760 14409322928 -2681453775 368411615 | __truncated__ ...
$ : num [1:16] -1307674368000 4339163001600 -6165817614720 5056995703824 -2706813345600 1009672107080 -272803210680 54631129553 | __truncated__ ...
$ : num [1:17] 20922789888000 -70734282393600 102992244837120 -87077748875904 48366009233424 -18861567058880 5374523477960 -1146| __truncated__ ...
$ : num [1:18] -355687428096000 1223405590579200 -1821602444624640 1583313975727488 -909299905844112 369012649234384 -1102284661| __truncated__ ...
$ : num [1:19] 6402373705728000 -22376988058521600 34012249593822720 -30321254007719424 17950712280921504 -7551527592063024 2353| __truncated__ ...
$ : num [1:20] -121645100408832000 431565146817638400 -668609730341153280 610116075740491776 -371384787345228032 161429736530118| __truncated__ ...
$ : num [1:21] 2432902008176640000 -8752948036761600000 13803759753640704000 -12870931245150988288 8037811822645052416 -35999795| __truncated__ ...
$ : num [1:22] -51090942171709440000 186244810780170256384 -298631902863216410624 284093315901811458048 -181664979520697106432 8| __truncated__ ...
$ : num [1:23] 1124000727777607680000 -4148476779335455342422 6756146673770930635882 -6548684852703068684468 4280722865357148127| __truncated__ ...
$ : num [1:24] -25852016738884978212844 96538966652493089472062 -159539850276066841072420 157375898285941509328800 -105005310755| __truncated__ ...
$ : num [1:25] 620448401733239410004482 -2342787216398719066880266 3925495373278097342488426 -3936561409138662762882662 26775033| __truncated__ ...
$ : num [1:26] -1.5511210043330986055e+25 5.9190128811701209102e+25 -1.0048017154835114860e+26 1.0233953060174467286e+26 -7.0874| __truncated__ ...
$ : num [1:27] 4.0329146112660565035e+26 -1.5544545591475622315e+27 2.6716745890688309436e+27 -2.7613079671937127630e+27 1.94506| __truncated__ ...
$ : num [1:28] -1.0888869450418351940e+28 4.2373564558110791470e+28 -7.3689668464005995789e+28 7.7226989703299075002e+28 -5.5278| __truncated__ ...
$ : num [1:29] 3.0488834461171383673e+29 -1.1973486770775205350e+30 2.1056842815502785854e+30 -2.2360453801563801659e+30 1.62501| __truncated__ ...
$ : num [1:30] -8.8417619937397007720e+30 3.5027999979859809425e+31 -6.2262192842035595300e+31 6.6951000306085306220e+31 -4.9361| __truncated__ ...
$ : num [1:31] 2.6525285981219103217e+32 -1.0596817613895339068e+33 1.9028937852409277222e+33 -2.0707922020245950068e+33 1.54779| __truncated__ ...
$ : num [1:32] -8.2228386541779224300e+33 3.3115387462887740419e+34 -6.0049389103858293445e+34 6.6097452048003371788e+34 -5.0052| __truncated__ ...
$ : num [1:33] 2.6313083693369351778e+35 -1.0679152374665855743e+36 1.9546958387863532367e+36 -2.1751678546399660615e+36 1.66777| __truncated__ ...
$ : num [1:34] -8.6833176188118859386e+36 3.5504333673331013781e+37 -6.5572877917416238255e+37 7.3735235041905231499e+37 -5.7211| __truncated__ ...
$ : num [1:35] 2.9523279903960411956e+38 -1.2158306625120664949e+39 2.2649821828654830341e+39 -2.5725708693421940525e+39 2.01893| __truncated__ ...
$ : num [1:36] -1.0333147966386144222e+40 4.2849305986961928384e+40 -8.0490207062803971931e+40 9.2304962609842273660e+40 -7.3235| __truncated__ ...
$ : num [1:37] 3.7199332678990117750e+41 -1.5529081634970156107e+42 2.9404967602479048550e+42 -3.4034688610171260751e+42 2.72877| __truncated__ ...
$ : num [1:38] -1.3763753091226343103e+43 5.7829595376179477378e+43 -1.1035128829266950670e+44 1.2886884461788156777e+44 -1.0436| __truncated__ ...
$ : num [1:39] 5.2302261746660103788e+44 -2.2112883773860464835e+45 4.2511785504976208109e+45 -5.0073673837721691814e+45 4.09485| __truncated__ ...
$ : num [1:40] -2.0397882081197441589e+46 8.6763269335522420394e+46 -1.6800725184679326193e+47 1.9953850651761219480e+47 -1.6470| __truncated__ ...
$ : num [1:41] 8.1591528324789768384e+47 -3.4909286555020941686e+48 6.8070533432072529174e+48 -8.1495475125512810534e+48 6.78781| __truncated__ ...
$ : num [1:42] -3.3452526613163802765e+49 1.4394399015883375567e+50 -2.8258011572699944885e+50 3.4093850135780975664e+50 -2.8644| __truncated__ ...
$ : num [1:43] 1.4050061177528797887e+51 -6.0791001132841810165e+51 1.2012308850692809361e+52 -1.4601997172755010058e+52 1.23718| __truncated__ ...
$ : num [1:44] -6.0415263063373834070e+52 2.6280631098897264241e+53 -5.2260838069307500881e+53 6.3989818727915826584e+53 -5.4659| __truncated__ ...
$ : num [1:45] 2.6582715747884485291e+54 -1.1623892946578170823e+55 2.3257575061484273881e+55 -2.8678128620976040829e+55 2.46898| __truncated__ ...
$ : num [1:46] -1.1962222086548018857e+56 5.2573345417080618387e+56 -1.0582147707133705935e+57 1.3137733630054062175e+57 -1.1397| __truncated__ ...
$ : num [1:47] 5.5026221598120884566e+57 -2.4303361112722566149e+58 4.9203612906985852524e+58 -6.1491789468962053632e+58 5.37410| __truncated__ ...
$ : num [1:48] -2.5862324151116817769e+59 1.1477605944577728557e+60 -2.3368731677410574843e+60 2.9393177179482025238e+60 -2.5873| __truncated__ ...
$ : num [1:49] 1.2413915592536072529e+61 -5.5351131775484266502e+61 1.1331767264602853192e+62 -1.4342412362925477399e+62 1.27130| __truncated__ ...
$ : num [1:50] -6.0828186403426752248e+62 2.7246193725912650997e+63 -5.6079170914308826279e+63 7.1410997304795127091e+63 -6.3728| __truncated__ ...
$ : num [1:51] 3.0414093201713375575e+64 -1.3683925049359751420e+65 2.8312047394413541550e+65 -3.6266290361540651078e+65 3.25782| __truncated__ ...
$ : num [1:52] -1.5511187532873821895e+66 7.0092158683751869855e+66 -1.4575983421644503002e+67 1.8778928558329868306e+67 -1.6977| __truncated__ ...
$ : num [1:53] 8.0658175170943876850e+67 -3.6603034390879711215e+68 7.6496035379388942692e+68 -9.9108026845479753521e+68 9.01612| __truncated__ ...
$ : num [1:54] -4.2748832840600254849e+69 1.9480266402337188631e+70 -4.0908929094984936119e+70 5.3292214581898156305e+70 -4.8776| __truncated__ ...
$ : num [1:55] 2.3084369733924137926e+71 -1.0562092690102681180e+72 2.2285624375315236164e+72 -2.9186885165174851988e+72 2.68722| __truncated__ ...
$ : num [1:56] -1.2696403353658276447e+73 5.8322353492903995721e+73 -1.2362714333324404367e+74 1.6275643084599320405e+74 -1.5071| __truncated__ ...
$ : num [1:57] 7.1099858780486348106e+74 -3.2787481989562819739e+75 6.9814423801545704919e+75 -9.2379872707088637723e+75 8.60286| __truncated__ ...
$ : num [1:58] -4.0526919504877220528e+76 1.8759964592831294131e+77 -4.0122096386776682731e+77 5.3354671681055976127e+77 -4.9960| __truncated__ ...
$ : num [1:59] 2.3505613312828789064e+78 -1.0921306383347028158e+79 2.3458415550258790135e+79 -3.1346930538880236430e+79 2.95104| __truncated__ ...
$ : num [1:60] -1.3868311854568986494e+80 6.4670763794875757023e+80 -1.3949678238486155096e+81 1.8729273173441927954e+81 -1.7724| __truncated__ ...
$ : num [1:61] 8.3209871127413915807e+81 -3.8941141395471144579e+82 8.4344777068865678027e+82 -1.1377060686450018470e+83 1.08220| __truncated__ ...
$ : num [1:62] -5.0758021387722483584e+83 2.3837306122364814367e+84 -5.1839725425962773224e+84 7.0243517958033766216e+84 -6.7152| __truncated__ ...
$ : num [1:63] 3.1469973260387939392e+85 -1.4829887817253904824e+86 3.2379002825320564868e+86 -4.4069378388240559937e+86 4.23368| __truncated__ ...
$ : num [1:64] -1.9826083154044400851e+87 9.3742992981303482139e+87 -2.0547070658124494391e+88 2.8087498412844758467e+88 -2.7112| __truncated__ ...
$ : num [1:65] 1.2688693218588416544e+89 -6.0193776339574670939e+89 1.3243868214180979203e+90 -1.8181469690801889866e+90 1.76331| __truncated__ ...
$ : num [1:66] -8.2476505920824715167e+90 3.9252841552909421832e+91 -8.6687081155572118882e+91 1.1950393981163038974e+92 -1.1643| __truncated__ ...
$ : num [1:67] 5.4434493907744306946e+92 -2.5989351930841040122e+93 5.7606001978206695939e+93 -7.9739471087231774803e+93 7.80411| __truncated__ ...
$ : num [1:68] -3.6471110918188683221e+94 1.7467300287571241478e+95 -3.8855914844706894178e+95 5.4001505648227364044e+95 -5.3084| __truncated__ ...
$ : num [1:69] 2.4800355424368305480e+96 -1.1914235306466632910e+97 2.6596695097276399535e+97 -3.7109582989241675186e+97 3.66377| __truncated__ ...
$ : num [1:70] -1.7112245242814129737e+98 8.2456227168863450421e+98 -1.8470861970185381536e+99 2.5871579213549518927e+99 -2.5651| __truncated__ ...
$ : num [1:71] 1.1978571669969890270e+100 -5.7890481470632557228e+100 1.3012059606298630538e+101 -1.8294814069186518424e+101 1.8| __truncated__ ...
$ : num [1:72] -8.5047858856786217622e+101 4.1222027560848813702e+102 -9.2964528019426593605e+102 1.3119438585185413500e+103 -1.| __truncated__ ...
$ : num [1:73] 6.1234458376886076684e+103 -2.9764907702667928401e+104 6.7346680449595642394e+104 -9.5389603093529251486e+104 9.5| __truncated__ ...
$ : num [1:74] -4.4701154615126833672e+105 2.1789617081324474724e+106 -4.9460725805231493713e+106 7.0307877062772313318e+106 -7.| __truncated__ ...
$ : num [1:75] 3.3078854415193855896e+107 -1.6169017794795238364e+108 3.6818833266684551845e+108 -5.2522436284503823860e+108 5.3| __truncated__ ...
$ : num [1:76] -2.4809140811395391402e+109 1.2159842200511623568e+110 -2.7775815127961368041e+110 3.9760015546044713572e+110 -4.| __truncated__ ...
$ : num [1:77] 1.8854947016660498467e+111 -9.2662892132002297125e+111 2.1231217919255758633e+112 -3.0495369966273592590e+112 3.1| __truncated__ ...
$ : num [1:78] -1.4518309202828583793e+113 7.1538976411808377692e+113 -1.6440700689958935868e+114 2.3693747053223224138e+114 -2.| __truncated__ ...
$ : num [1:79] 1.1324281178206294607e+115 -5.5945584693238817257e+115 1.2895285514579778519e+116 -1.8645529708413703255e+116 1.9| __truncated__ ...
$ : num [1:80] -8.9461821307829729136e+116 4.4310254719440726042e+117 -1.0243221141211265501e+118 1.4858921324792623760e+118 -1.| __truncated__ ...
$ : num [1:81] 7.1569457046263778833e+118 -3.5537665596860405048e+119 8.2388871676884535807e+119 -1.1989569271246211327e+120 1.2| __truncated__ ...
$ : num [1:82] -5.7971260207473655482e+120 2.8857078590503191689e+121 -6.7090362714245079987e+121 9.7939399813863161548e+121 -1.| __truncated__ ...
$ : num [1:83] 4.7536433370128398181e+122 -2.3720775704420091149e+123 5.5302668211585995946e+123 -8.0981211474510242168e+123 8.4| __truncated__ ...
$ : num [1:84] -3.9455239697206569096e+124 1.9735780268038804985e+125 -4.6138422372660575078e+125 6.7767432205959360725e+125 -7.| __truncated__ ...
$ : num [1:85] 3.3142401345653519917e+126 -1.6617510664849802615e+127 3.8953632595715271720e+127 -5.7386027276732462302e+127 6.0| __truncated__ ...
$ : num [1:86] -2.8171041143805493616e+128 1.4158026466467986873e+129 -3.3276762813006478699e+129 4.9167659511179746439e+129 -5.| __truncated__ ...
$ : num [1:87] 2.4227095383672724281e+130 -1.2204073802306273493e+131 2.8759596283850249550e+131 -4.2616954807744647036e+131 4.4| __truncated__ ...
$ : num [1:88] -2.1077572983795269089e+132 1.0641771303390130589e+133 -2.5142889504972779273e+133 3.7364346645576347861e+133 -3.| __truncated__ ...
$ : num [1:89] 1.8548264225739835537e+134 -9.3858363199671108468e+134 2.2232160477409944922e+135 -3.3132053943156916684e+135 3.5| __truncated__ ...
$ : num [1:90] -1.6507955160908452499e+136 8.3719425889964682154e+136 -1.9880481188094522282e+137 2.9709849614183752036e+137 -3.| __truncated__ ...
$ : num [1:91] 1.4857159644817606887e+138 -7.5512562852577294662e+138 1.7976152495175036245e+139 -2.6937669464646323008e+139 2.8| __truncated__ ...
$ : num [1:92] NA 6.8865003792293521135e+140 -1.6433811333461860699e+141 2.4693040737779904589e+141 -2.6434198406811229404e+141 | __truncated__ ...
$ : num [1:93] NA NA 1.5187971430577206482e+143 -2.2881935592092131505e+143 2.4566392941644126205e+143 -2.0135884670620576933e+1| __truncated__ ...
$ : num [1:94] NA NA NA 2.1432079814951455513e+145 -2.3075564791649958167e+145 1.8972036673093578071e+145 -1.2449705167011399568| __truncated__ ...
$ : num [1:95] NA NA NA NA 2.1905351702300476589e+147 -1.8064470120624465352e+147 1.1892443223721652732e+147 -6.4462672591068725| __truncated__ ...
$ : num [1:96] NA NA NA NA NA 1.7380300131616246036e+149 -1.1478465763741815726e+149 6.2428783283887463338e+148 -2.8607775787970| __truncated__ ...
$ : num [1:97] NA NA NA NA NA NA 1.1193130134508306829e+151 -6.1079478528906147963e+150 2.8087752589290090883e+150 -1.1077977617| __truncated__ ...
$ : num [1:98] NA NA NA NA NA NA NA 6.0366407186489795377e+152 -2.7855914796900449384e+152 1.1026515814854526896e+152 NA NA ...
$ : num [1:99] NA NA NA NA NA NA NA NA 2.7902460572827344116e+154 -1.1084544646526441131e+154 NA NA ...
[list output truncated]
S2.full.n : num 10
S2.tab : List of 10
$ : num 1
$ : num [1:2] 1 1
$ : num [1:3] 1 3 1
$ : num [1:4] 1 7 6 1
$ : num [1:5] 1 15 25 10 1
$ : num [1:6] 1 31 90 65 15 1
$ : num [1:7] 1 63 301 350 140 21 1
$ : num [1:8] 1 127 966 1701 1050 266 28 1
$ : num [1:9] 1 255 3025 7770 6951 2646 462 36 1
$ : num [1:10] 1 511 9330 34105 42525 22827 5880 750 45 1
> showSys.time(S <- Stirling2(30, 7))# updating table -> typically not zero
Time user system elapsed
Time 0 0 0
> showSys.time(S. <- Stirling2(30, 7))# lookup --> should be zero
Time user system elapsed
Time 0 0 0
> stopifnot(identical(S, S.),
+ all.equal(S, Stirling2(30,7, method="direct"), tolerance=1e-15))
>
> ls.str(copula:::.nacopEnv)
Bern.tab : list()
Eul.full.n : num 0
Eul.tab : list()
S1.full.n : num 10
S1.tab : List of 200
$ : num 1
$ : num [1:2] -1 1
$ : num [1:3] 2 -3 1
$ : num [1:4] -6 11 -6 1
$ : num [1:5] 24 -50 35 -10 1
$ : num [1:6] -120 274 -225 85 -15 1
$ : num [1:7] 720 -1764 1624 -735 175 -21 1
$ : num [1:8] -5040 13068 -13132 6769 -1960 322 -28 1
$ : num [1:9] 40320 -109584 118124 -67284 22449 -4536 546 -36 1
$ : num [1:10] -362880 1026576 -1172700 723680 -269325 63273 -9450 870 -45 1
$ : num [1:11] 3628800 -10628640 12753576 -8409500 3416930 -902055 157773 -18150 1320 -55 1
$ : num [1:12] -39916800 120543840 -150917976 105258076 -45995730 13339535 -2637558 357423 -32670 1925 -66 1
$ : num [1:13] 479001600 -1486442880 1931559552 -1414014888 657206836 -206070150 44990231 -6926634 749463 -55770 2717 -78 1
$ : num [1:14] -6227020800 19802759040 -26596717056 20313753096 -9957703756 3336118786 -790943153 135036473 -16669653 1474473 -91091 3731 ...
$ : num [1:15] 87178291200 -283465647360 392156797824 -310989260400 159721605680 -56663366760 14409322928 -2681453775 368411615 | __truncated__ ...
$ : num [1:16] -1307674368000 4339163001600 -6165817614720 5056995703824 -2706813345600 1009672107080 -272803210680 54631129553 | __truncated__ ...
$ : num [1:17] 20922789888000 -70734282393600 102992244837120 -87077748875904 48366009233424 -18861567058880 5374523477960 -1146| __truncated__ ...
$ : num [1:18] -355687428096000 1223405590579200 -1821602444624640 1583313975727488 -909299905844112 369012649234384 -1102284661| __truncated__ ...
$ : num [1:19] 6402373705728000 -22376988058521600 34012249593822720 -30321254007719424 17950712280921504 -7551527592063024 2353| __truncated__ ...
$ : num [1:20] -121645100408832000 431565146817638400 -668609730341153280 610116075740491776 -371384787345228032 161429736530118| __truncated__ ...
$ : num [1:21] 2432902008176640000 -8752948036761600000 13803759753640704000 -12870931245150988288 8037811822645052416 -35999795| __truncated__ ...
$ : num [1:22] -51090942171709440000 186244810780170256384 -298631902863216410624 284093315901811458048 -181664979520697106432 8| __truncated__ ...
$ : num [1:23] 1124000727777607680000 -4148476779335455342422 6756146673770930635882 -6548684852703068684468 4280722865357148127| __truncated__ ...
$ : num [1:24] -25852016738884978212844 96538966652493089472062 -159539850276066841072420 157375898285941509328800 -105005310755| __truncated__ ...
$ : num [1:25] 620448401733239410004482 -2342787216398719066880266 3925495373278097342488426 -3936561409138662762882662 26775033| __truncated__ ...
$ : num [1:26] -1.5511210043330986055e+25 5.9190128811701209102e+25 -1.0048017154835114860e+26 1.0233953060174467286e+26 -7.0874| __truncated__ ...
$ : num [1:27] 4.0329146112660565035e+26 -1.5544545591475622315e+27 2.6716745890688309436e+27 -2.7613079671937127630e+27 1.94506| __truncated__ ...
$ : num [1:28] -1.0888869450418351940e+28 4.2373564558110791470e+28 -7.3689668464005995789e+28 7.7226989703299075002e+28 -5.5278| __truncated__ ...
$ : num [1:29] 3.0488834461171383673e+29 -1.1973486770775205350e+30 2.1056842815502785854e+30 -2.2360453801563801659e+30 1.62501| __truncated__ ...
$ : num [1:30] -8.8417619937397007720e+30 3.5027999979859809425e+31 -6.2262192842035595300e+31 6.6951000306085306220e+31 -4.9361| __truncated__ ...
$ : num [1:31] 2.6525285981219103217e+32 -1.0596817613895339068e+33 1.9028937852409277222e+33 -2.0707922020245950068e+33 1.54779| __truncated__ ...
$ : num [1:32] -8.2228386541779224300e+33 3.3115387462887740419e+34 -6.0049389103858293445e+34 6.6097452048003371788e+34 -5.0052| __truncated__ ...
$ : num [1:33] 2.6313083693369351778e+35 -1.0679152374665855743e+36 1.9546958387863532367e+36 -2.1751678546399660615e+36 1.66777| __truncated__ ...
$ : num [1:34] -8.6833176188118859386e+36 3.5504333673331013781e+37 -6.5572877917416238255e+37 7.3735235041905231499e+37 -5.7211| __truncated__ ...
$ : num [1:35] 2.9523279903960411956e+38 -1.2158306625120664949e+39 2.2649821828654830341e+39 -2.5725708693421940525e+39 2.01893| __truncated__ ...
$ : num [1:36] -1.0333147966386144222e+40 4.2849305986961928384e+40 -8.0490207062803971931e+40 9.2304962609842273660e+40 -7.3235| __truncated__ ...
$ : num [1:37] 3.7199332678990117750e+41 -1.5529081634970156107e+42 2.9404967602479048550e+42 -3.4034688610171260751e+42 2.72877| __truncated__ ...
$ : num [1:38] -1.3763753091226343103e+43 5.7829595376179477378e+43 -1.1035128829266950670e+44 1.2886884461788156777e+44 -1.0436| __truncated__ ...
$ : num [1:39] 5.2302261746660103788e+44 -2.2112883773860464835e+45 4.2511785504976208109e+45 -5.0073673837721691814e+45 4.09485| __truncated__ ...
$ : num [1:40] -2.0397882081197441589e+46 8.6763269335522420394e+46 -1.6800725184679326193e+47 1.9953850651761219480e+47 -1.6470| __truncated__ ...
$ : num [1:41] 8.1591528324789768384e+47 -3.4909286555020941686e+48 6.8070533432072529174e+48 -8.1495475125512810534e+48 6.78781| __truncated__ ...
$ : num [1:42] -3.3452526613163802765e+49 1.4394399015883375567e+50 -2.8258011572699944885e+50 3.4093850135780975664e+50 -2.8644| __truncated__ ...
$ : num [1:43] 1.4050061177528797887e+51 -6.0791001132841810165e+51 1.2012308850692809361e+52 -1.4601997172755010058e+52 1.23718| __truncated__ ...
$ : num [1:44] -6.0415263063373834070e+52 2.6280631098897264241e+53 -5.2260838069307500881e+53 6.3989818727915826584e+53 -5.4659| __truncated__ ...
$ : num [1:45] 2.6582715747884485291e+54 -1.1623892946578170823e+55 2.3257575061484273881e+55 -2.8678128620976040829e+55 2.46898| __truncated__ ...
$ : num [1:46] -1.1962222086548018857e+56 5.2573345417080618387e+56 -1.0582147707133705935e+57 1.3137733630054062175e+57 -1.1397| __truncated__ ...
$ : num [1:47] 5.5026221598120884566e+57 -2.4303361112722566149e+58 4.9203612906985852524e+58 -6.1491789468962053632e+58 5.37410| __truncated__ ...
$ : num [1:48] -2.5862324151116817769e+59 1.1477605944577728557e+60 -2.3368731677410574843e+60 2.9393177179482025238e+60 -2.5873| __truncated__ ...
$ : num [1:49] 1.2413915592536072529e+61 -5.5351131775484266502e+61 1.1331767264602853192e+62 -1.4342412362925477399e+62 1.27130| __truncated__ ...
$ : num [1:50] -6.0828186403426752248e+62 2.7246193725912650997e+63 -5.6079170914308826279e+63 7.1410997304795127091e+63 -6.3728| __truncated__ ...
$ : num [1:51] 3.0414093201713375575e+64 -1.3683925049359751420e+65 2.8312047394413541550e+65 -3.6266290361540651078e+65 3.25782| __truncated__ ...
$ : num [1:52] -1.5511187532873821895e+66 7.0092158683751869855e+66 -1.4575983421644503002e+67 1.8778928558329868306e+67 -1.6977| __truncated__ ...
$ : num [1:53] 8.0658175170943876850e+67 -3.6603034390879711215e+68 7.6496035379388942692e+68 -9.9108026845479753521e+68 9.01612| __truncated__ ...
$ : num [1:54] -4.2748832840600254849e+69 1.9480266402337188631e+70 -4.0908929094984936119e+70 5.3292214581898156305e+70 -4.8776| __truncated__ ...
$ : num [1:55] 2.3084369733924137926e+71 -1.0562092690102681180e+72 2.2285624375315236164e+72 -2.9186885165174851988e+72 2.68722| __truncated__ ...
$ : num [1:56] -1.2696403353658276447e+73 5.8322353492903995721e+73 -1.2362714333324404367e+74 1.6275643084599320405e+74 -1.5071| __truncated__ ...
$ : num [1:57] 7.1099858780486348106e+74 -3.2787481989562819739e+75 6.9814423801545704919e+75 -9.2379872707088637723e+75 8.60286| __truncated__ ...
$ : num [1:58] -4.0526919504877220528e+76 1.8759964592831294131e+77 -4.0122096386776682731e+77 5.3354671681055976127e+77 -4.9960| __truncated__ ...
$ : num [1:59] 2.3505613312828789064e+78 -1.0921306383347028158e+79 2.3458415550258790135e+79 -3.1346930538880236430e+79 2.95104| __truncated__ ...
$ : num [1:60] -1.3868311854568986494e+80 6.4670763794875757023e+80 -1.3949678238486155096e+81 1.8729273173441927954e+81 -1.7724| __truncated__ ...
$ : num [1:61] 8.3209871127413915807e+81 -3.8941141395471144579e+82 8.4344777068865678027e+82 -1.1377060686450018470e+83 1.08220| __truncated__ ...
$ : num [1:62] -5.0758021387722483584e+83 2.3837306122364814367e+84 -5.1839725425962773224e+84 7.0243517958033766216e+84 -6.7152| __truncated__ ...
$ : num [1:63] 3.1469973260387939392e+85 -1.4829887817253904824e+86 3.2379002825320564868e+86 -4.4069378388240559937e+86 4.23368| __truncated__ ...
$ : num [1:64] -1.9826083154044400851e+87 9.3742992981303482139e+87 -2.0547070658124494391e+88 2.8087498412844758467e+88 -2.7112| __truncated__ ...
$ : num [1:65] 1.2688693218588416544e+89 -6.0193776339574670939e+89 1.3243868214180979203e+90 -1.8181469690801889866e+90 1.76331| __truncated__ ...
$ : num [1:66] -8.2476505920824715167e+90 3.9252841552909421832e+91 -8.6687081155572118882e+91 1.1950393981163038974e+92 -1.1643| __truncated__ ...
$ : num [1:67] 5.4434493907744306946e+92 -2.5989351930841040122e+93 5.7606001978206695939e+93 -7.9739471087231774803e+93 7.80411| __truncated__ ...
$ : num [1:68] -3.6471110918188683221e+94 1.7467300287571241478e+95 -3.8855914844706894178e+95 5.4001505648227364044e+95 -5.3084| __truncated__ ...
$ : num [1:69] 2.4800355424368305480e+96 -1.1914235306466632910e+97 2.6596695097276399535e+97 -3.7109582989241675186e+97 3.66377| __truncated__ ...
$ : num [1:70] -1.7112245242814129737e+98 8.2456227168863450421e+98 -1.8470861970185381536e+99 2.5871579213549518927e+99 -2.5651| __truncated__ ...
$ : num [1:71] 1.1978571669969890270e+100 -5.7890481470632557228e+100 1.3012059606298630538e+101 -1.8294814069186518424e+101 1.8| __truncated__ ...
$ : num [1:72] -8.5047858856786217622e+101 4.1222027560848813702e+102 -9.2964528019426593605e+102 1.3119438585185413500e+103 -1.| __truncated__ ...
$ : num [1:73] 6.1234458376886076684e+103 -2.9764907702667928401e+104 6.7346680449595642394e+104 -9.5389603093529251486e+104 9.5| __truncated__ ...
$ : num [1:74] -4.4701154615126833672e+105 2.1789617081324474724e+106 -4.9460725805231493713e+106 7.0307877062772313318e+106 -7.| __truncated__ ...
$ : num [1:75] 3.3078854415193855896e+107 -1.6169017794795238364e+108 3.6818833266684551845e+108 -5.2522436284503823860e+108 5.3| __truncated__ ...
$ : num [1:76] -2.4809140811395391402e+109 1.2159842200511623568e+110 -2.7775815127961368041e+110 3.9760015546044713572e+110 -4.| __truncated__ ...
$ : num [1:77] 1.8854947016660498467e+111 -9.2662892132002297125e+111 2.1231217919255758633e+112 -3.0495369966273592590e+112 3.1| __truncated__ ...
$ : num [1:78] -1.4518309202828583793e+113 7.1538976411808377692e+113 -1.6440700689958935868e+114 2.3693747053223224138e+114 -2.| __truncated__ ...
$ : num [1:79] 1.1324281178206294607e+115 -5.5945584693238817257e+115 1.2895285514579778519e+116 -1.8645529708413703255e+116 1.9| __truncated__ ...
$ : num [1:80] -8.9461821307829729136e+116 4.4310254719440726042e+117 -1.0243221141211265501e+118 1.4858921324792623760e+118 -1.| __truncated__ ...
$ : num [1:81] 7.1569457046263778833e+118 -3.5537665596860405048e+119 8.2388871676884535807e+119 -1.1989569271246211327e+120 1.2| __truncated__ ...
$ : num [1:82] -5.7971260207473655482e+120 2.8857078590503191689e+121 -6.7090362714245079987e+121 9.7939399813863161548e+121 -1.| __truncated__ ...
$ : num [1:83] 4.7536433370128398181e+122 -2.3720775704420091149e+123 5.5302668211585995946e+123 -8.0981211474510242168e+123 8.4| __truncated__ ...
$ : num [1:84] -3.9455239697206569096e+124 1.9735780268038804985e+125 -4.6138422372660575078e+125 6.7767432205959360725e+125 -7.| __truncated__ ...
$ : num [1:85] 3.3142401345653519917e+126 -1.6617510664849802615e+127 3.8953632595715271720e+127 -5.7386027276732462302e+127 6.0| __truncated__ ...
$ : num [1:86] -2.8171041143805493616e+128 1.4158026466467986873e+129 -3.3276762813006478699e+129 4.9167659511179746439e+129 -5.| __truncated__ ...
$ : num [1:87] 2.4227095383672724281e+130 -1.2204073802306273493e+131 2.8759596283850249550e+131 -4.2616954807744647036e+131 4.4| __truncated__ ...
$ : num [1:88] -2.1077572983795269089e+132 1.0641771303390130589e+133 -2.5142889504972779273e+133 3.7364346645576347861e+133 -3.| __truncated__ ...
$ : num [1:89] 1.8548264225739835537e+134 -9.3858363199671108468e+134 2.2232160477409944922e+135 -3.3132053943156916684e+135 3.5| __truncated__ ...
$ : num [1:90] -1.6507955160908452499e+136 8.3719425889964682154e+136 -1.9880481188094522282e+137 2.9709849614183752036e+137 -3.| __truncated__ ...
$ : num [1:91] 1.4857159644817606887e+138 -7.5512562852577294662e+138 1.7976152495175036245e+139 -2.6937669464646323008e+139 2.8| __truncated__ ...
$ : num [1:92] NA 6.8865003792293521135e+140 -1.6433811333461860699e+141 2.4693040737779904589e+141 -2.6434198406811229404e+141 | __truncated__ ...
$ : num [1:93] NA NA 1.5187971430577206482e+143 -2.2881935592092131505e+143 2.4566392941644126205e+143 -2.0135884670620576933e+1| __truncated__ ...
$ : num [1:94] NA NA NA 2.1432079814951455513e+145 -2.3075564791649958167e+145 1.8972036673093578071e+145 -1.2449705167011399568| __truncated__ ...
$ : num [1:95] NA NA NA NA 2.1905351702300476589e+147 -1.8064470120624465352e+147 1.1892443223721652732e+147 -6.4462672591068725| __truncated__ ...
$ : num [1:96] NA NA NA NA NA 1.7380300131616246036e+149 -1.1478465763741815726e+149 6.2428783283887463338e+148 -2.8607775787970| __truncated__ ...
$ : num [1:97] NA NA NA NA NA NA 1.1193130134508306829e+151 -6.1079478528906147963e+150 2.8087752589290090883e+150 -1.1077977617| __truncated__ ...
$ : num [1:98] NA NA NA NA NA NA NA 6.0366407186489795377e+152 -2.7855914796900449384e+152 1.1026515814854526896e+152 NA NA ...
$ : num [1:99] NA NA NA NA NA NA NA NA 2.7902460572827344116e+154 -1.1084544646526441131e+154 NA NA ...
[list output truncated]
S2.full.n : num 10
S2.tab : List of 30
$ : num 1
$ : num [1:2] 1 1
$ : num [1:3] 1 3 1
$ : num [1:4] 1 7 6 1
$ : num [1:5] 1 15 25 10 1
$ : num [1:6] 1 31 90 65 15 1
$ : num [1:7] 1 63 301 350 140 21 1
$ : num [1:8] 1 127 966 1701 1050 266 28 1
$ : num [1:9] 1 255 3025 7770 6951 2646 462 36 1
$ : num [1:10] 1 511 9330 34105 42525 22827 5880 750 45 1
$ : num [1:11] 1 1023 28501 145750 246730 179487 63987 NA NA NA NA
$ : num [1:12] 1 2047 86526 611501 1379400 1323652 627396 NA NA NA NA NA
$ : num [1:13] 1 4095 261625 2532530 7508501 9321312 5715424 NA NA NA NA NA NA
$ : num [1:14] 1 8191 788970 10391745 40075035 63436373 49329280 NA NA NA NA NA NA NA
$ : num [1:15] 1 16383 2375101 42355950 210766920 420693273 408741333 NA NA NA NA NA NA NA NA
$ : num [1:16] 1 32767 7141686 171798901 1096190550 2734926558 3281882604 NA NA NA NA NA NA NA NA NA
$ : num [1:17] 1 65535 21457825 694337290 5652751651 17505749898 25708104786 NA NA NA NA NA ...
$ : num [1:18] 1 131071 64439010 2798806985 28958095545 110687251039 197462483400 NA NA NA NA NA ...
$ : num [1:19] 1 262143 193448101 11259666950 147589284710 693081601779 1492924634839 NA NA NA NA NA ...
$ : num [1:20] 1 524287 580606446 45232115901 749206090500 4306078895384 11143554045652 NA NA NA NA NA ...
$ : num [1:21] 1 1048575 1742343625 181509070050 3791262568401 26585679462804 82310957214948 NA NA NA NA NA ...
$ : num [1:22] 1 2097151 5228079450 727778623825 19137821912055 163305339345225 602762379967440 NA NA NA NA NA ...
$ : num [1:23] 1 4194303 15686335501 2916342574750 96416888184100 998969857983405 4382641999117305 NA NA NA NA NA ...
$ : num [1:24] 1 8388607 47063200806 11681056634501 485000783495250 6090236036084530 31677463851804540 NA NA NA NA NA ...
$ : num [1:25] NA 16777215 141197991025 46771289738810 2436684974110751 37026417000002432 227832482998716320 NA NA NA NA NA ...
$ : num [1:26] NA NA 423610750290 187226356946265 12230196160292566 224595186974125344 1631853797991016448 NA NA NA NA NA ...
$ : num [1:27] NA NA NA 749329038535350 61338207158409096 1359801318005044736 11647571772911241216 NA NA NA NA NA ...
$ : num [1:28] NA NA NA NA 307440364830580864 8220146115188677632 82892803728383737856 NA NA NA NA NA ...
$ : num [1:29] NA NA NA NA NA 49628317055962644480 588469772213874851840 NA NA NA NA NA ...
$ : num [1:30] NA NA NA NA NA NA 4168916722553086541064 NA NA NA NA NA ...
>
> rbind(C.direct = system.time(Sd <- Stirling2(100,10, method="direct")),
+ C.lookup = system.time(Sl <- Stirling2(100,10, method="lookup")))
user.self sys.self elapsed user.child sys.child
C.direct 0 0 0 NA NA
C.lookup 0 0 0 NA NA
> ## should be equal; and lookup time should be "zero" when called again:
> (s3 <- system.time(for(i in 1:20) S. <- Stirling2(100, 10))[[1]])
[1] 0
> stopifnot(all.equal(Sd, Sl, tolerance = 1e-15))
> if(doExtras && isLinux) stopifnot(s3 <= 0.020)
> ## 0.010 fails on good ole' Solaris when that is busy..
> ## Here, the direct method already overflows, but the "lookup" still works
> rbind(C.direct = system.time(Sd <- Stirling2(200,190, method="direct")),
+ C.lookup = system.time(Sl <- Stirling2(200,190, method="lookup")))
user.self sys.self elapsed user.child sys.child
C.direct 0.00 0 0.00 NA NA
C.lookup 0.01 0 0.02 NA NA
> Sd ; Sl
[1] NaN
[1] 1.452971e+36
> (s4 <- system.time(for(i in 1:20) S. <- Stirling2(200,190))[[1]])
[1] 0
> if(doExtras && isLinux) stopifnot(s4 <= 0.025)
> # 0.010 occasionally barely fails (prints "0.010") on Martin's X201
>
>
> ### Eulerian Numbers ###########################################################
>
> ##' cheap "direct" version of Eulerian.all():
> Euleri.A <- function(n)
+ sapply(0:max(0,n-1), Eulerian, n=n, method="direct")
> stopifnot(identical(Euler.l5 <- lapply(0:5, Euleri.A),
+ list(1,
+ 1,
+ c(1, 1),
+ c(1, 4, 1),
+ c(1, 11, 11, 1),
+ c(1, 26, 66, 26, 1))))
>
> p.Eul <- function(n) {
+ plot(E1 <- Eulerian.all(n), log="y", yaxt="n",
+ xlab = "k", ylab = bquote(A(.(n), k)),
+ main = bquote("Eulerian numbers "* A(.(n), k)))
+ if(require("sfsmisc"))
+ eaxis(2, quantile(axTicks(2), (0:16)/16, type=3), at.small=numeric())
+ else axis(2)
+ lines(E2 <- Euleri.A(n), col="green3", type="o")
+ invisible(cbind(E1=E1, E2=E2))
+ }
>
> if(!dev.interactive(orNone=TRUE)) pdf("Eulerian-ex.pdf")
>
> e60 <- p.Eul(60); all.equal(e60[,2],e60[,1], tolerance=0) ## 3.82e-09
Loading required package: sfsmisc
[1] "Mean relative difference: 3.821322e-09"
> e70 <- p.Eul(70); all.equal(e70[,2],e70[,1]) ## 2.97e-6
[1] "Mean relative difference: 2.974384e-06"
> e90 <- p.Eul(90); all.equal(e90[,2],e90[,1]) ## 0.032
[1] "Mean relative difference: 0.03194358"
> e100 <- p.Eul(100); all.equal(e100[,2],e100[,1]) ## 0.80028 --- visible in center
[1] "Mean relative difference: 0.8002766"
> e110 <- p.Eul(110); all.equal(e110[,2],e110[,1]) ## 0.992 --- visible in center
[1] "Mean relative difference: 0.9924735"
> e120 <- p.Eul(120); all.equal(e120[,2],e120[,1]) ## 1 -- problem in center
[1] "Mean relative difference: 1.000044"
> e150 <- p.Eul(150) ## clear problem in center -- close to overflow though
> e170 <- p.Eul(170) ## clear problem in center -- close to overflow though
> max(e170[,"E1"]) # 7.5964e+305 -- almost maximum
[1] 7.596386e+305
> dev.off()
null device
1
>
> ### Bernoulli numbers =========================================================
>
> ##--- see example(Bernoulli) ---> ../man/Bernoulli.Rd ------
> ##--- ~~~~~~~~~~~~~~~~~~~ ------
>
> ## BUT -- the algorithm is *really* not accurate enough ...
> ## ---> try to work with higher precision
> ## ---> Use package "Rmpfr" and its own Bernoulli() / Bernoulli.all()
>
> ## NB: The following does not print *unless* you evaluate it *outside*
> ## the if(..) clause
> if(doExtras && require("Rmpfr")) { ## note that it has its own Bernoulli() !
+ if(!dev.interactive(orNone=TRUE)) pdf("Bernoulli-ex.pdf")
+ ## Bernoulli.all(.. prec = ) --> automatically uses 'Rmpfr' arithmetic
+ showSys.time(B100 <- Bernoulli.all(100)) # still less than a milli second
+ showSys.time(B100.250 <- as.numeric(Bernoulli.all(100, prec = 250)))
+ ## 0.75 sec [Core i5 (2010)]
+ re <- log(abs(1 - B100/B100.250))
+ m <- cbind(Bn = B100, Bn.250 = B100.250, "-log10(rel.Err)" =
+ -round(re/log(10), 2))
+ rownames(m) <- paste("n=",0:100, sep="")
+ m[1:5,]
+ print(m[2*(1:15) -1,]) ## for n=10: still 8 correct digits
+
+ showSys.time(B100.1k <- as.numeric(Bernoulli.all(100, prec = 1024)))
+ ## The first 34 are "the same", but after [41],
+ ## even 250 precBits were *not* sufficient:
+ print(round(log10(abs(1 - B100.250/B100.1k))[seq(1,99,by=2)], 2))
+
+ ## some accuracy investigation:
+ nn <- 8:100; nn <- nn[nn %% 2 == 0]; nn
+ B.asy <- sapply(nn, copula::Bernoulli, method="asymp")
+ B.sumB <- sapply(nn, copula::Bernoulli, method="sumBin")
+ B.prec <- Rmpfr::Bernoulli(nn, precBits = 2048)
+ relErr <- as.numeric(1 - B.asy / B.prec)
+ relE2 <- as.numeric(1 - B.sumB / B.prec)
+
+ matplot(nn, abs(cbind(relErr, relE2)), pch=1:2,
+ main = "| rel.Error { Bernoulli(n) } |",
+ xlab = expression(n), axes=FALSE,
+ ylim = c(1e-15, 1e-4), log="y", type="b")
+ sfsmisc::eaxis(1); sfsmisc::eaxis(2)
+ legend("topright", c("asymp","sumBin"), bty="n", col=1:2, lty=1:2, pch=1:2)
+ ##--> an optimal "hybrid" method will use "asymp" from about n ~= 20
+
+ dev.off()
+ } ## end if(require("Rmpfr"))
>
>
>
> ### Polylogarithm Function #####################################################
>
> EQ <- function(x,y, tol = 1e-15) all.equal(x,y, tolerance=tol)
>
> x <- (0:127)/128 # < 1
> stopifnot(EQ(polylog(s = 1, x, n.sum=10000), -log(1-x)),
+ EQ(polylog(s = -1, .1, n.sum= 100), 10/81),
+ EQ(polylog(s = -1, .1, "negI-s-Stirling"), 10/81),
+ EQ(polylog(x, -1, "negI-s-Stirling"), x /(1-x)^2),
+ EQ(polylog(x, -2, "negI-s-Stirling"), x*(1+x)/(1-x)^3),
+ EQ(polylog(x, -4, "negI-s-Stirling"), x*(1+x)*(1+x*(10+x)) / (1-x)^5),
+ identical( polylog (x, -4, "negI-s-Stirling"),
+ Vectorize(polylog,"z")(x, -4, "negI-s-Stirling")),
+ identical( polylog (x, -4, "sum", n.sum=10000),
+ Vectorize(polylog,"z")(x, -4, "sum", n.sum=10000)),
+ EQ(polylog(x, -1, "negI-s-Eulerian"), x /(1-x)^2),
+ EQ(polylog(x, -2, "negI-s-Eulerian"), x*(1+x)/(1-x)^3),
+ EQ(polylog(x, -4, "negI-s-Eulerian"), x*(1+x)*(1+x*(10+x)) / (1-x)^5),
+ TRUE)
>
> ##--> now do plots etc in ../man/polylog.Rd :
> ## ~~~~~~~~~~~~~~~~~
>
>
> ### Debye Functions ---- Better treat with (NA, NaN, Inf) than gsl's debye:
> ## --------------- -> ../R/special-func.R
> x <- c(NA, NaN, 0, 1e-100, 1e-10, .01, .1, 1:10, 20, 1e10, 1e100, Inf)
> D1 <- copula:::debye1(x)
> D2 <- copula:::debye2(x)
> (isI <- which(x == Inf))
[1] 21
> cbind(x, D1, D2)
x D1 D2
[1,] NA NA NA
[2,] NaN NaN NaN
[3,] 0e+00 1.000000e+00 1.000000e+00
[4,] 1e-100 1.000000e+00 1.000000e+00
[5,] 1e-10 1.000000e+00 1.000000e+00
[6,] 1e-02 9.975028e-01 9.966708e-01
[7,] 1e-01 9.752778e-01 9.670833e-01
[8,] 1e+00 7.775046e-01 7.078785e-01
[9,] 2e+00 6.069473e-01 4.930826e-01
[10,] 3e+00 4.804352e-01 3.426140e-01
[11,] 4e+00 3.881480e-01 2.405537e-01
[12,] 5e+00 3.208762e-01 1.723292e-01
[13,] 6e+00 2.712605e-01 1.266692e-01
[14,] 7e+00 2.339480e-01 9.570686e-02
[15,] 8e+00 2.052393e-01 7.426881e-02
[16,] 9e+00 1.826333e-01 5.905305e-02
[17,] 1e+01 1.644435e-01 4.797150e-02
[18,] 2e+01 8.224670e-02 1.202056e-02
[19,] 1e+10 1.644934e-10 4.808228e-20
[20,] 1e+100 1.644934e-100 4.808228e-200
[21,] Inf 0.000000e+00 0.000000e+00
>
> stopifnot(is.na(c(D1[1],D2[1])), is.nan(c(D1[2],D2[2])),
+ !is.na(D1[-(1:2)]), !is.nan(D1[-2]),
+ !is.na(D2[-(1:2)]), !is.nan(D2[-2]),
+ D1[isI] == 0,
+ D2[isI] == 0)
>
> ### lsum() and lssum() --------------
> lsum <- copula:::lsum
> lssum <- copula:::lssum
> lsum0 <- function(lx) log(sum(exp(lx)))
>
> lx1 <- 10*(-80:70) # is easy
> lx2 <- 600:750 # lsum0() not ok [could work with rescaling]
> lx3 <- -(750:900) # lsum0() = -Inf - not good enough
> m3 <- cbind(lx1,lx2,lx3)
> lx6 <- lx5 <- lx4 <- lx3
> lx4[149:151] <- -Inf ## = log(0)
> lx5[150] <- Inf
> lx6[1] <- NA_real_
> m6 <- cbind(m3,lx4,lx5,lx6)
> stopifnot(all.equal(lsum(lx1), lsum0(lx1)),
+ all.equal((ls1 <- lsum(lx1)), 700.000045400960403, tol=8e-16),
+ all.equal((ls2 <- lsum(lx2)), 750.458675145387133, tol=8e-16),
+ all.equal((ls3 <- lsum(lx3)), -749.541324854612867, tol=8e-16),
+ ## identical: matrix-version <==> vector versions
+ identical(lsum(lx4), ls3),
+ identical(lsum(lx4), lsum(head(lx4, -3))), # the last three were -Inf
+ identical(lsum(lx5), Inf),
+ identical(lsum(lx6), lx6[1]),
+ identical((lm3 <- lsum(m3)), c(lx1=ls1, lx2=ls2, lx3=ls3)),
+ identical(lsum(m6), c(lm3, lx4=ls3, lx5=Inf, lx6=lx6[1])),
+ TRUE)
>
> ## TODO: lssum() testing !!
>
> proc.time()
user system elapsed
3.76 0.17 3.92