R Under development (unstable) (2025-09-17 r88852 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. > # trying to cover many methods -- not all of them > require(houba) Loading required package: houba > > x <- as.mvector(2**(1:4)) > y <- 2*x > x <- x/2 > x <- x + c(1,2) / y - y / c(1, 2) > x <- -x * c(64, 128) > stopifnot( all(x[] == c(176, 224, 764, 1016)) ) > stopifnot( all((x / (y * 0.25))[] == c(176, 112, 191, 127)) ) > stopifnot( all((x * y / 64)[] == c(11, 28, 191, 508)) ) > stopifnot( all(((x - 1:2) + 2:1)[] == c(177, 223, 765, 1015) ) ) > stopifnot( all(((2:1 + x) - 1:2)[] == c(177, 223, 765, 1015) ) ) > > x <- as.mvector(2**(1:4)) > dim(x) <- c(2,2) > y <- 2*x > x <- x/2 > x <- x + c(1,2) / y - y / c(1, 2) > x <- -x * c(64, 128) > stopifnot( all(x[] == c(176, 224, 764, 1016)) ) > stopifnot( all((x / (y * 0.25))[] == c(176, 112, 191, 127)) ) > stopifnot( all((x * y / 64)[] == c(11, 28, 191, 508)) ) > stopifnot( all(((x - 1:2) + 2:1)[] == c(177, 223, 765, 1015) ) ) > stopifnot( all(((2:1 + x) - 1:2)[] == c(177, 223, 765, 1015) ) ) > > x <- as.mvector(2**(1:4)) > dim(x) <- c(2,1,2) > y <- 2*x > x <- x/2 > x <- x + c(1,2) / y - y / c(1, 2) > x <- -x * c(64, 128) > stopifnot( all(x[] == c(176, 224, 764, 1016)) ) > stopifnot( all((x / (y * 0.25))[] == c(176, 112, 191, 127)) ) > stopifnot( all((x * y / 64)[] == c(11, 28, 191, 508)) ) > stopifnot( all(((x - 1:2) + 2:1)[] == c(177, 223, 765, 1015) ) ) > stopifnot( all(((2:1 + x) - 1:2)[] == c(177, 223, 765, 1015) ) ) > > > proc.time() user system elapsed 0.39 0.15 0.53