Documentation for ipl/procs/numbers.icn states that adr(i) is the "same as digred()". This may be true for all values except 0. Digred(0) returns 1; adr(0) returns 0; Compare code for the function
digroot() called by digred(). This returns the value of 1 when i = 0.
procedure digroot(i)^I^I#: digital root
if i = 0 then return 1
i %:= 9
return if i = 0 then 9 else i
end
Having looked at the code associated with each procedure adr(i) and digred(i), I would say that the documentation is wrong.
adr(i) will only work for positive numbers, it aborts on negative numbers
digred(i) works for both positive and negative numbers and makes a special case for 0 simply because it is using % 9 and for all multiples of 9 returning 9.
Even though both give the same value for all positive integers, including big integers, they are different functions and the documentation should be changed to reflect this.