Skip to content

Commit 451e2b6

Browse files
author
Release Manager
committed
Trac #34632: wrappers for acb_poly_[rl]gamma_series
URL: https://trac.sagemath.org/34632 Reported by: mmezzarobba Ticket author(s): Marc Mezzarobba Reviewer(s): Frédéric Chapoton
2 parents a6c1e4c + cd0fb01 commit 451e2b6

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

src/sage/rings/polynomial/polynomial_complex_arb.pyx

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -717,6 +717,44 @@ cdef class Polynomial_complex_arb(Polynomial):
717717
sig_off()
718718
return res
719719

720+
def _lgamma_series(self, long n):
721+
r"""
722+
Return the series expansion of the log-gamma function composed
723+
with this polynomial, truncated before degree ``n``.
724+
725+
EXAMPLES::
726+
727+
sage: Pol.<x> = CBF[]
728+
sage: (1000 + x)._lgamma_series(3)
729+
([0.00050025008333331...])*x^2 + ([6.9072551956488...])*x + [5905.2204232091...]
730+
"""
731+
cdef Polynomial_complex_arb res = self._new()
732+
if n < 0:
733+
n = 0
734+
sig_on()
735+
acb_poly_lgamma_series(res.__poly, self.__poly, n, prec(self))
736+
sig_off()
737+
return res
738+
739+
def _rgamma_series(self, long n):
740+
r"""
741+
Return the series expansion of the reciprocal gamma function composed
742+
with this polynomial, truncated before degree ``n``.
743+
744+
EXAMPLES::
745+
746+
sage: Pol.<x> = CBF[]
747+
sage: (-1 + x)._rgamma_series(4)
748+
([1.23309373642178...])*x^3 + ([0.422784335098467...])*x^2 - x
749+
"""
750+
cdef Polynomial_complex_arb res = self._new()
751+
if n < 0:
752+
n = 0
753+
sig_on()
754+
acb_poly_rgamma_series(res.__poly, self.__poly, n, prec(self))
755+
sig_off()
756+
return res
757+
720758
def _lambert_w_series(self, long n, branch=0):
721759
r"""
722760
Return the series expansion of the specified branch of the Lambert W

0 commit comments

Comments
 (0)