Skip to content

Commit ebb688f

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 9069a36 commit ebb688f

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
@@ -327,8 +327,9 @@ def logarithm(self, name='z'):
327327
def coeff_log(k):
328328
# Return the k-th coefficient of the logarithm
329329
k = ZZ(k)
330-
if k.is_power_of(q):
331-
return self._compute_coefficient_log(k.log(q))
330+
v, u = k.val_unit(q)
331+
if u == 1:
332+
return self._compute_coefficient_log(v)
332333
else:
333334
return self._base.zero()
334335
return L(coeff_log, valuation=1)

0 commit comments

Comments
 (0)