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

Commit

Permalink
write docstrings of Stirling generators
Browse files Browse the repository at this point in the history
  • Loading branch information
dkrenn committed Nov 1, 2015
1 parent fd35046 commit 532c41c
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions src/sage/rings/asymptotic/asymptotic_expansion_generators.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,24 @@ class AsymptoticExpansionGenerators(SageObject):
@staticmethod
def Stirling(var, precision=None, skip_constant_factor=False):
r"""
Return Stirling's approximation formula for factorials.
INPUT:
- ``var`` -- a string for the variable name.
- ``precision`` -- (default: ``None``) an integer. If ``None``, then
the default precision of the asymptotic ring is used.
- ``skip_constant_factor`` -- (default: ``False``) a
boolean. If set, then the constant factor is left out.
As a consequence, the coefficient ring of the output changes
from ``Symbolic Constants Subring`` (if ``False``) to
``Rational Field`` (if ``True``).
OUTPUT:
An asymptotic expansion.
EXAMPLES::
Expand Down Expand Up @@ -143,6 +161,26 @@ def Stirling(var, precision=None, skip_constant_factor=False):
@staticmethod
def log_Stirling(var, precision=None, skip_constant_summand=False):
r"""
Return the logarithm of Stirling's approximation formula
for factorials.
INPUT:
- ``var`` -- a string for the variable name.
- ``precision`` -- (default: ``None``) an integer. If ``None``, then
the default precision of the asymptotic ring is used.
- ``skip_constant_summand`` -- (default: ``False``) a
boolean. If set, then the constant summand is left out.
As a consequence, the coefficient ring of the output changes
from ``Symbolic Constants Subring`` (if ``False``) to
``Rational Field`` (if ``True``).
OUTPUT:
An asymptotic expansion.
EXAMPLES::
sage: asymptotic_expansions.log_Stirling('n', precision=7)
Expand Down

0 comments on commit 532c41c

Please sign in to comment.