Skip to content

Commit 771688f

Browse files
DavidAyottexcaruso
andauthored
Update src/sage/rings/function_field/drinfeld_modules/charzero_drinfeld_module.py
Co-authored-by: Xavier Caruso <[email protected]>
1 parent ebb688f commit 771688f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/sage/rings/function_field/drinfeld_modules/charzero_drinfeld_module.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,8 +224,9 @@ def exponential(self, name='z'):
224224
def coeff_exp(k):
225225
# Return the k-th coefficient of the exponential.
226226
k = ZZ(k)
227-
if k.is_power_of(q):
228-
return self._compute_coefficient_exp(k.log(q))
227+
v, u = k.val_unit(q)
228+
if u == 1:
229+
return self._compute_coefficient_exp(v)
229230
else:
230231
return zero
231232
return L(coeff_exp, valuation=1)

0 commit comments

Comments
 (0)