digits(0) is giving empty vector. It should give [0].
--------------------------------------------------------------------------------------------------------------
(14:29) gp > ?digits
digits(x,{b=10}): gives the vector formed by the digits of x in base b (x and b
integers).
(14:30) gp > digits(0)
%28 = []
(14:30) gp > digits(1)
%29 = [1]
(14:30) gp > digits(1,2)
%30 = [1]
(14:31) gp > digits(0,2)
%31 = []
(14:31) gp >
---------------------------------------------------------------------------
regards,
B.Chandrasekaran