some wrong special cases with power_mod



Hello,

create_list(power_mod(i,0,1),i,0,4);
  [1,1,1,1,1]

while it should be always 0 here, assuming that
the result of mod shall be the outcome:
create_list(mod(i,1),i,0,4);
  [0,0,0,0,0]

Sure, 0=1 mod 1, however for power_mod(a,n,m) the unique
representative of a^n in {0,...,m-1} shall be returned
(that would be reasonable).

Best

Oliver

P.S. If this is agreed as error, I'll file a bug-report.

Likely the code has a first case n=0, where it then just
returns 1, while mod(1,m) should be returned.