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. > require(randtoolbox) Loading required package: randtoolbox Loading required package: rngWELL This is randtoolbox. For an overview, type 'help("randtoolbox")'. > > out <- "file" > out <- "console" > > set.generator("MersenneTwister", initialization="init2002", + resolution=53, seed=1) > s0 <- get.description() > > > if(out == "file") + { + capture.output(print(R.version), file = "MT19937-init2022.txt") + capture.output(print(Sys.info()), file = "MT19937-init2022.txt", append = TRUE) + capture.output(print(s0), file = "MT19937-init2022.txt", append = TRUE) + capture.output(RNGkind(), file = "MT19937-init2022.txt", append = TRUE) + }else + { + print(R.version) + print(Sys.info()) + print(s0) + print(RNGkind()) + } _ platform x86_64-w64-mingw32 arch x86_64 os mingw32 crt ucrt system x86_64, mingw32 status Under development (unstable) major 4 minor 5.0 year 2024 month 10 day 17 svn rev 87242 language R version.string R Under development (unstable) (2024-10-17 r87242 ucrt) nickname Unsuffered Consequences sysname release version nodename machine "Windows" "Server x64" "build 20348" "CRANWIN3" "x86-64" login user effective_user udomain "CRAN" "CRAN" "CRAN" "CRANWIN3" $name [1] "MersenneTwister" $parameters initialization resolution "init2002" "53" $state [1] 624 1 1812433254 -581806939 -1185793151 64984499 [7] -902309212 446538473 -1665206540 -1841621738 1394803949 1021787430 [13] 2063496713 1304877364 1713639158 889001601 1651239412 1450863289 [19] 745575081 361057727 -2006195346 1463387568 -2045478934 26637982 [25] 204036717 1655702041 1329048465 2092351466 1681619666 -1074306981 [31] 1301783610 626286181 294669048 -757838856 -1035449048 -1744866023 [37] 1160881866 308703547 295714668 35508674 1599247281 376272024 [43] -1128507359 1852735737 -614098429 612352556 -1534777463 -478216955 [49] 699140493 1087846865 394927937 2063539671 645417889 -1957298247 [55] -521799684 678121169 -1287982676 1163491294 -1735679436 543155592 [61] -1100785949 -1831423999 -419820436 475483913 -587399220 -413158421 [67] 1264657097 208126250 1802809301 367907560 -1861591603 -1443640847 [73] -1914259418 -1383208324 -51580417 -2065738570 828161871 -1423851145 [79] 990638198 178193628 1012573979 1223581943 -961943713 1901888414 [85] -381090546 -1126304907 656194888 1553610174 466840498 686407570 [91] 280737523 -1818478279 1272981410 -1105535317 -1000257014 1564477163 [97] -161745743 823708826 880616227 1730254897 335723347 2123911971 [103] 344194767 119099153 -1379710180 -955141826 -1770024326 1191117250 [109] -891155110 -305994359 -1719572001 -222230113 663832315 808080503 [115] 724042340 -1328777754 -1795324057 -985761715 1915303227 72616536 [121] 387525935 -1503266045 -2104061730 -554638522 831297460 -544002432 [127] -2104855252 899144100 -1948409293 -443271467 -1398003473 1548614403 [133] -618259891 2050891594 -129074148 1883017153 -1626179769 50330561 [139] 2063572142 1853585557 1716111087 -1357718926 1650859709 -1612661574 [145] 565243175 -372740109 -812934591 -1485885796 2099376873 230358556 [151] 1065827745 196966939 -1026121666 -669459031 1477799595 -145513556 [157] -1537131610 -1262269360 -2094858505 -873286585 -149585037 -689714224 [163] 1186485728 -774485145 -1214233833 -407653139 -264519541 1699987022 [169] 1393253586 1710066407 710337383 -540354739 -1553878927 337455371 [175] 1304761604 -702285657 -1195582109 -291290891 317081535 997754381 [181] 480565460 -488701864 1068029852 776179010 470617537 -641091875 [187] -2021395377 1055365147 1317172834 -880234293 -1459566683 28845217 [193] 631741764 -1960415084 -729501201 1225096926 1277781438 -1878959073 [199] 1268768054 -1544178055 267768398 -2119583858 268654341 -1744436541 [205] -1323343888 1666669894 1934871760 509782083 -1496498626 -1460950404 [211] -1800818041 1965005899 -1641921531 -1977772393 1297426078 916214929 [217] -1327106292 -2058160290 -1818242011 128488253 -17253140 -1278774745 [223] 1690883702 1329810641 593010415 -1953653717 1754238478 1242698701 [229] -2142372769 2103269013 926178633 647225267 -51180154 1489208161 [235] -1106168375 1327553793 -650366485 684513652 -1688412239 -1589637747 [241] -1737498278 1294205096 70104222 -1274883768 2015571237 -1526393816 [247] 401698695 -1482604487 328919870 984940142 1653817439 471643152 [253] 538942283 2040555667 1211982999 1663497772 -1353173568 -1293940598 [259] 313271977 -650464593 -1871017249 -1665921227 -844140360 44600781 [265] -1661098008 -27952550 -90052826 1955987363 -1704358411 2120168063 [271] 1460034243 258056600 -601417209 779446436 902696389 -66265909 [277] -1129176069 -816352431 1500865135 905884796 -612920829 -1857119464 [283] -1699079077 -150482633 1299603103 648536946 1762836247 -29218100 [289] 950840266 -1365974574 2051369009 2071186450 1164619682 210405235 [295] 1296628868 -1869492577 -211580392 1978331343 -1104068497 602128683 [301] 2003319330 1043377147 756690484 24776626 1835824233 1156421176 [307] 2125448878 1333136189 607751135 -39352529 -56434287 -1711791664 [313] 230472465 -1257707539 1546348932 -1757687885 110471952 520621708 [319] 63613561 -1451293701 775036 1899744556 1168115970 -1609880975 [325] -884716638 -1143865143 634647644 -655841902 -950342532 1525171811 [331] 1878800371 -938437180 -618424370 602053165 -1608259058 -591412214 [337] -540005924 -324936373 1749014201 -903860246 -1816815296 2121779806 [343] -1658277936 769835312 -64427705 1909812524 417081626 -1198447972 [349] 387659697 -530468047 -842041833 -476689598 -1286046972 15253694 [355] 1479260759 -1873638576 -2074223939 38831551 1032912064 -894011098 [361] -1932158464 -306260430 1950464958 -1046394171 1225815945 1211036180 [367] 346407094 -427790532 1257086026 -1569731065 -1451231638 -147726214 [373] 1729974832 1256499145 -528991395 784776076 -6689869 -391434776 [379] -863444432 -1502377319 -1358978142 -758370404 -781983176 605476293 [385] 1774961976 981422589 822525778 -951427364 422954622 1323482938 [391] -1771501876 -1548357940 1664448205 272567300 711582493 -669245189 [397] -679101597 950619756 -1430798807 108006277 -318653944 680217319 [403] 173747636 291134870 198587329 595310009 941470866 -1856478928 [409] 1681923153 1654783272 -763178042 -145425581 -1372260309 684907209 [415] -1178278934 -1006824410 -341589704 -962539289 1400401813 -549045498 [421] 1701705628 -550455403 1838265811 -980934784 -400127146 -484935887 [427] 181324387 983160249 1444959400 -458303143 -1262293969 310789231 [433] -593401734 1407580781 -1783391667 -1181144611 1777261998 -2086068545 [439] 106383174 -1333946796 995776421 -988880175 -2113937261 -1994902545 [445] 1909543740 -271811123 1671619075 -2143011192 237668401 -1090456043 [451] 1303668692 -426707509 -1557069397 -203941263 -1417186625 134376279 [457] 398912026 863520778 -582498373 -851753630 -2111157744 -1697587994 [463] 349776833 274697715 -28373586 -12780527 -764209429 520237914 [469] -925929899 -2009296958 387086485 618942879 219892882 2008897906 [475] -2001217736 -1387530820 -441670703 327550390 1558751403 2125694704 [481] 1822570484 -1884999031 436622776 -1603843206 1080819771 -1336859962 [487] -1627808455 2117901613 440045635 -433862825 -720004595 -1084668048 [493] 1368601573 -1860927776 86704919 -666859263 1909858745 227461000 [499] -1764457831 838433817 730224848 1060658180 1318482825 233266846 [505] -1942166451 2086493219 -468611741 -1120589606 1455208243 1356597942 [511] 663563056 -1793147922 -81432037 1585241464 873997246 -1697068552 [517] 427064229 1587746589 259660817 1688808891 -129132951 1359025114 [523] 2013923952 -1331455585 -1391746564 356112706 501549847 1609412897 [529] 1685128111 -1655663690 700554261 914150235 2010650618 2029243163 [535] -1248457385 715702687 -2088010542 -1249669080 -1372300117 -1797389881 [541] -1293147692 706666890 -2019043441 -1200782913 -1513269584 -1002014630 [547] -56353218 278500659 1440033346 1552714131 336554687 -1452386687 [553] -2039922986 -2114895924 99970159 2078552309 1172694639 1359399314 [559] 546452524 349053834 -1222712927 -1251720577 -980540798 1594992663 [565] -712697631 2114045278 585873328 840739494 -819188811 1506518790 [571] -286480644 229989333 -712689084 363921215 -702124776 1833533669 [577] 708173875 564248927 853943228 -2012235922 -1420809249 -316304011 [583] -1962270765 1354524859 58121641 1445193461 1936635021 -920639098 [589] -829714236 385589199 1819596280 912895627 1877426726 733280947 [595] 2004202992 -983186585 -562914105 309903272 97290141 -1349547961 [601] -378490224 1326195031 -554029241 -690222034 -661658340 -902037865 [607] 1257547457 251825182 -976267211 847033774 137350663 1716455973 [613] 546850455 -67392777 -1250752343 -2035093283 -1852219038 -1337995960 [619] -2096194917 1269686727 -1646851191 1339159363 1473334647 -1908295684 [625] 2069268389 $authors [1] "M. Matsumoto, T. Nishimura, 1998" [1] "user-supplied" "Inversion" "Rejection" > x <- runif(10) > print(x, digits=12) [1] 0.417022004702574 0.720324493442158 0.000114374817345 0.302332572631840 [5] 0.146755890817113 0.092338594768798 0.186260211377671 0.345560727043048 [9] 0.396767474230670 0.538816734003357 > > trueoutput_seed1 <- c( + 0.417022004702574, + 0.720324493442158, + 0.000114374817345, + 0.302332572631840, + 0.146755890817113, + 0.092338594768798, + 0.186260211377671, + 0.345560727043048, + 0.396767474230670, + 0.538816734003357) > > if(out == "file") + write.csv(cbind(x, trueoutput_seed1), file="MT19937-init2022.csv") > > abs(x - trueoutput_seed1) < 1e-6 [1] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE > > if(FALSE) + { + + macos.out <- read.table("share/macos-outputs/MT19937-init2022.txt", skip = 39, header=FALSE, nrows = 89) + macos.out2 <- read.table("share/macos-outputs/MT19937-init2022.txt", skip = 128, header=FALSE, nrows = 1) + macos.state <- as.integer(macos.out[1, -1]) + for(i in 2:NROW(macos.out)) + macos.state <- c(macos.state, as.integer(macos.out[i, -1])) + macos.state <- c(macos.state, as.integer(unlist(macos.out2[,-1]))) + + + win.out <- read.table("share/windows7-outputs/MT19937-init2022.txt", skip = 32, header=FALSE, nrows = 104) + win.out2 <- read.table("share/windows7-outputs/MT19937-init2022.txt", skip = 136, header=FALSE, nrows = 1) + win.state <- as.integer(c(unlist(win.out[, -1]), unlist(win.out2[,-1]))) + win.state <- as.integer(win.out[1, -1]) + for(i in 2:NROW(win.out)) + win.state <- c(win.state, as.integer(win.out[i, -1])) + win.state <- c(win.state, as.integer(unlist(win.out2[,-1]))) + + + cbind(win.state, macos.state) + + macos.state == win.state + } > > proc.time() user system elapsed 0.28 0.06 0.32