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

Commit

Permalink
add back ogf() and egf() with deprecation warning; fix doctests
Browse files Browse the repository at this point in the history
  • Loading branch information
rwst committed Mar 7, 2014
1 parent bbc5196 commit 85b5f9b
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/sage/rings/power_series_ring_element.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -1771,7 +1771,7 @@ cdef class PowerSeries(AlgebraElement):
sage: R.<t> = PowerSeriesRing(QQ)
sage: f = t + t^2/factorial(2) + 2*t^3/factorial(3)
sage: f.ogf()
sage: f.egf_to_ogf()
t + t^2 + 2*t^3
"""
return self.parent()([self[i] * arith.factorial(i) for i in range(self.degree()+1)])
Expand All @@ -1787,11 +1787,21 @@ cdef class PowerSeries(AlgebraElement):
sage: R.<t> = PowerSeriesRing(QQ)
sage: f = t + t^2 + 2*t^3
sage: f.egf()
sage: f.ogf_to_egf()
t + 1/2*t^2 + 1/3*t^3
"""
return self.parent()([self[i] / arith.factorial(i) for i in range(self.degree()+1)])

def ogf(self):
from sage.misc.superseded import deprecation, deprecated_function_alias
deprecation(15705,'You can just call egf_to_ogf() instead')
return self.parent()([self[i] * arith.factorial(i) for i in range(self.degree()+1)])

def egf(self):
from sage.misc.superseded import deprecation, deprecated_function_alias
deprecation(15705,'You can just call ogf_to_egf() instead')
return self.parent()([self[i] / arith.factorial(i) for i in range(self.degree()+1)])

def _pari_(self):
"""
Return PARI power series corresponding to this series.
Expand Down

0 comments on commit 85b5f9b

Please sign in to comment.