R Under development (unstable) (2024-10-17 r87242 ucrt) -- "Unsuffered Consequences" Copyright (C) 2024 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. > > library(randtoolbox) Loading required package: rngWELL This is randtoolbox. For an overview, type 'help("randtoolbox")'. > > mytrace <- TRUE > mytrace <- FALSE > > if(FALSE) + { + + #degree 0 + mjrec(1, 1, echo=mytrace) + + #degree 3 : x^3+x^2+1, p306 Glasserman (2003) + p13 <- int2bit(13) + m1 <- 1 + m2 <- m3 <- 3 + + prevmj <- cbind(int2bit(m1), int2bit(m2), int2bit(m3)) + res <- mjrec(prevmj, p13, echo=mytrace) + m4 <- bit2int(res) + + prevmj <- cbind(int2bit(m2), int2bit(m3), int2bit(m4)) + res <- mjrec(prevmj, p13, echo=mytrace) + m5 <- bit2int(res) + + c(m1, m2, m3, m4, m5) + + #degree 1 : x+1, p319 Glasserman (2003) + p3 <- int2bit(3) + m1 <- 1 + res <- mjrec(int2bit(m1), p3, echo=mytrace) + m2 <- bit2int(res) + + prevmj <- cbind(int2bit(m1), int2bit(m2)) + res <- mjrec(prevmj, p3, echo=mytrace) + m3 <- bit2int(res) + + prevmj <- cbind(int2bit(m1), int2bit(m2), int2bit(m3)) + res <- mjrec(prevmj, p3, echo=mytrace) + m4 <- bit2int(res) + + c(m1, m2, m3, m4) + + } > > proc.time() user system elapsed 0.18 0.10 0.28