Generate a regular sequence of biginteger or bigfloat values.

When calling seq(), exactly two of the following must be specified:

  • to

  • by

  • Either length.out or along.with

# S3 method for bignum_vctr
seq(from, to = NULL, by = NULL, length.out = NULL, along.with = NULL, ...)

Arguments

from

Start value of the sequence. Always included in the result.

A biginteger or bigfloat scalar.

to

Stop value of the sequence. Only included in the result if by divides the interval between from and to exactly.

to is cast to the type of from.

by

Amount to increment the sequence by.

by is cast to the type of from.

length.out

Length of the resulting sequence.

along.with

Vector who's length determines the length of the resulting sequence.

...

These dots are for future extensions and must be empty.

Value

A sequence with the type of from.

Examples

seq(biginteger(0), 10, by = 2)
#> <biginteger[6]>
#> [1] 0  2  4  6  8  10

seq(biginteger(0), 10, length.out = 3)
#> <biginteger[3]>
#> [1] 0  5  10

seq(biginteger(0), by = 3, length.out = 3)
#> <biginteger[3]>
#> [1] 0 3 6

seq(bigfloat(0), by = -0.05, length.out = 6)
#> <bigfloat[6]>
#> [1] 0     -0.05 -0.1  -0.15 -0.2  -0.25