The command adicDigit(p,e,0) returns 0. If x∈(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 o1 : QQ |
If L is a list of rational numbers in the unit interval, adicDigit(p,e,L) returns a list where this function is applied to each element of L.
i2 : adicDigit(5,4,{1/3,1/7,2/3}) o2 = {3, 4, 1} o2 : List |