Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
do not take "mod 0", skip "mod"
Browse files Browse the repository at this point in the history
  • Loading branch information
dimpase committed Jun 1, 2021
1 parent 8d44ad0 commit 05b434a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/sage/groups/abelian_gps/abelian_group_gap.py
Expand Up @@ -365,7 +365,10 @@ def _element_constructor_(self, x, check=True):
raise ValueError("input does not match the number of generators")
x = self.one()
for i in range(len(exp)):
x *= gens_gap[i]**(exp[i] % orders[i])
if orders[i] > 0:
x *= gens_gap[i]**(exp[i] % orders[i])
else:
x *= gens_gap[i]**exp[i]
x = x.gap()
return self.element_class(self, x, check=check)

Expand Down

0 comments on commit 05b434a

Please sign in to comment.