The command adicDigit(p, e, 0) returns 0. If x is a rational number in the interval (0,1], then adicDigit(p, e, x) returns the coefficient of p-e in the non-terminating base p expansion of x.
i1 : adicDigit(5, 4, 1/3) o1 = 3 |
If L is a list of rational numbers in the unit interval, adicDigit(p, e, L) returns a list containing the eth digits (base p) of the elements of L.
i2 : adicDigit(5, 4, {1/3, 1/7, 2/3}) o2 = {3, 4, 1} o2 : List |