R Under development (unstable) (2025-11-15 r89024 ucrt) -- "Unsuffered Consequences" Copyright (C) 2025 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. > ## This file is part of SimInf, a framework for stochastic > ## disease spread simulations. > ## > ## Copyright (C) 2015 -- 2025 Stefan Widgren > ## > ## SimInf 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. > ## > ## SimInf 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 . > > library(SimInf) > > ## Specify the number of threads to use. > set_num_threads(1) > > ## For debugging > sessionInfo() R Under development (unstable) (2025-11-15 r89024 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] SimInf_10.1.0 loaded via a namespace (and not attached): [1] MASS_7.3-65 compiler_4.6.0 Matrix_1.7-4 tools_4.6.0 grid_4.6.0 [6] digest_0.6.38 lattice_0.22-7 > > ## Define a tolerance > tol <- 1e-8 > > stopifnot(identical(lambertW0(c(NA_real_, Inf, -Inf, NaN)), + c(NA_real_, Inf, NaN, NaN))) > > stopifnot(all(abs(lambertW0(1) - 0.5671433) < tol)) > > proc.time() user system elapsed 1.46 0.18 1.64