R Under development (unstable) (2026-07-21 r90286) -- "Unsuffered Consequences" Copyright (C) 2026 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu 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(PTT) > > set.seed(42) > x <- matrix(c(0.10, 0.20, 0.35, 0.65, 0.80, 0.90), ncol = 1) > pred <- matrix(c(0, 0.25, 0.50, 0.75, 1), ncol = 1) > > fit <- apt( + x, Xpred = pred, max.resol = 3, + n.grid = 2, n.s = 2, n.post.samples = 1 + ) > stopifnot( + length(fit$predictive_densities) == nrow(pred), + all(is.finite(fit$predictive_densities)), + all(fit$predictive_densities >= 0), + identical(colnames(fit$part_points_hmap), c("X1.l", "X1.u", "level", "state")), + identical(dim(fit$Omega), c(1L, 2L)), + length(fit$part_points_post_samples) == 1L + ) > > set.seed(99) > sample.a <- apt(x, max.resol = 3, n.grid = 2, n.s = 2, n.post.samples = 1) > set.seed(99) > sample.b <- apt(x, max.resol = 3, n.grid = 2, n.s = 2, n.post.samples = 1) > stopifnot(identical(sample.a$part_points_post_samples, sample.b$part_points_post_samples)) > > kernel.a <- apt(x, max.resol = 2, tran.mode = 2, rho0 = 0.1, n.grid = 2, n.s = 2) > kernel.b <- apt(x, max.resol = 2, tran.mode = 2, rho0 = 0.9, n.grid = 2, n.s = 2) > stopifnot( + identical(kernel.a$logrho, kernel.b$logrho), + identical(kernel.a$logphi, kernel.b$logphi) + ) > > standardized <- apt( + c(-3, -2, -1), Xpred = c(-3, -1), + Omega.type = "standardized", max.resol = 2, n.grid = 2, n.s = 2 + ) > stopifnot( + standardized$Omega[1, 1] < -3, + standardized$Omega[1, 2] > -1, + all(is.finite(standardized$predictive_densities)) + ) > > conditional <- cond.apt( + X = x, Y = rev(x), Xpred = pred[2:4, ], Ypred = pred[2:4, ], + max.resX = 2, max.resY = 2, n.grid = 2, n.s = 3 + ) cgbt.cpp:256:41: runtime error: shift exponent -65534 is negative #0 0x7bb83ee0d9fc in CondGBT::find_hmap_part() /data/localhost/ripley/R/packages/tests-gcc-SAN/PTT/src/cgbt.cpp:256 #1 0x7bb83ee9c481 in fitCondPTTcpp(arma::Mat, arma::Mat, arma::Mat, arma::Mat, arma::Mat, arma::Mat, int, int, double, int, double, int, int, double, double, int, int, double, int) /data/localhost/ripley/R/packages/tests-gcc-SAN/PTT/src/main.cpp:247 #2 0x7bb83ee385c7 in _PTT_fitCondPTTcpp /data/localhost/ripley/R/packages/tests-gcc-SAN/PTT/src/RcppExports.cpp:62 #3 0x00000075bc45 in R_doDotCall /data/localhost/ripley/R/svn/R-devel/src/main/dotcode.c:853 #4 0x000000761eea in do_dotcall /data/localhost/ripley/R/svn/R-devel/src/main/dotcode.c:1437 #5 0x0000008eb97b in bcEval_loop /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:8150 #6 0x0000008d687b in bcEval /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:7533 #7 0x000000877eba in Rf_eval /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:1167 #8 0x00000088e6ca in R_execClosure /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2398 #9 0x00000089235d in applyClosure_core /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2314 #10 0x000000878568 in Rf_applyClosure /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2333 #11 0x000000878568 in Rf_eval /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:1278 #12 0x0000008a689e in do_set /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:3585 #13 0x000000878996 in Rf_eval /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:1230 #14 0x000000a1ee48 in Rf_ReplIteration /data/localhost/ripley/R/svn/R-devel/src/main/main.c:264 #15 0x000000a1ee48 in R_ReplConsole /data/localhost/ripley/R/svn/R-devel/src/main/main.c:317 #16 0x000000a3cada in run_Rmainloop /data/localhost/ripley/R/svn/R-devel/src/main/main.c:1237 #17 0x000000a3cb72 in Rf_mainloop /data/localhost/ripley/R/svn/R-devel/src/main/main.c:1244 #18 0x000000411f5f in main /data/localhost/ripley/R/svn/R-devel/src/main/Rmain.c:29 #19 0x7fb84ac0a680 in __libc_start_call_main (/lib64/libc.so.6+0x3680) (BuildId: 17f2e1fd905f485786f6fd6e3bede4ad737137e7) #20 0x7fb84ac0a797 in __libc_start_main@GLIBC_2.2.5 (/lib64/libc.so.6+0x3797) (BuildId: 17f2e1fd905f485786f6fd6e3bede4ad737137e7) #21 0x000000412924 in _start (/data/localhost/ripley/R/gcc-SAN3/bin/exec/R+0x412924) (BuildId: 7bd069e7b1c3f2758f94ae347cb95ae3bb7314b6) > stopifnot( + length(conditional$predictive_densities) == 3L, + all(is.finite(conditional$predictive_densities)), + identical(dim(conditional$OmegaX), c(1L, 2L)), + identical(dim(conditional$OmegaY), c(1L, 2L)) + ) > > stopifnot( + inherits(try(apt(c(-1, 0), max.resol = 2), silent = TRUE), "try-error"), + inherits(try(apt(x, max.resol = 15), silent = TRUE), "try-error"), + inherits(try(cond.apt(x, x, Xpred = 0.5), silent = TRUE), "try-error") + ) > > proc.time() user system elapsed 1.051 0.117 1.152