intAtBase: Integer expansion

Description Usage Arguments Value Examples

Description

Expansion of a positive integer in an integer base

Usage

1
intAtBase(n, base = 2L)

Arguments

n

the integer to be expanded

base

the base of the expansion

Value

The expansion of n in a vector.

Examples

1
2
3
4
intAtBase(41, base=3)
2*1 + 1*3 + 1*3^2 + 1*3^3
floatExpand(41, base=3)
(1*1/3 + 1*1/3^2 + 1*1/3^3 + 2*1/3^4) * 3^4

stla/expansions documentation built on May 30, 2019, 5:46 p.m.