R Under development (unstable) (2025-02-18 r87748 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. > library(flint) > > args. <- list(from = 3L, to = -4L, by = -0.5, length.out = 8L) > args <- mapply(as, args., c("slong", "slong", "fmpq", "ulong"), + SIMPLIFY = FALSE) > > usage <- list(c( "length.out"), + c("from", "to" ), + c( "by", "length.out"), + c("from", "to", "by" ), + c("from", "to", "length.out"), + c("from", "by", "length.out"), + c( "to", "by", "length.out")) > value <- rep(c("ulong", "fmpz", "fmpq"), c(1L, 1L, 5L)) > > for (i in seq_along(usage)) { + u <- usage[[i]] + v <- value[[i]] + s <- as(do.call(seq.int, args.[u]), v) + stopifnot(flintIdentical(do.call(seq.int, args[u]), s), + flintIdentical(do.call(seq , args[u]), s)) + } > > d <- 4L > nvec. <- d:1L > from. <- seq.int(from = 1L, by = d + 1L, length.out = d) > s <- as(sequence(nvec = nvec., from = from.), "ulong") > stopifnot(flintIdentical(sequence(nvec = as(nvec., "ulong"), + from = as(from., "ulong")), + s), + all(s == which(.row(c(d, d)) >= .col(c(d, d))))) > > proc.time() user system elapsed 0.73 0.17 0.89