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

Commit

Permalink
Trac #19898: rename harmonic_number to HarmonicNumber
Browse files Browse the repository at this point in the history
  • Loading branch information
cheuberg committed Jan 22, 2016
1 parent e193ac1 commit bedd23a
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/sage/rings/asymptotic/asymptotic_expansion_generators.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
:widths: 4 12
:header-rows: 0
* - :meth:`~AsymptoticExpansionGenerators.harmonic_number`
* - :meth:`~AsymptoticExpansionGenerators.HarmonicNumber`
- harmonic numbers
* - :meth:`~AsymptoticExpansionGenerators.Stirling`
Expand Down Expand Up @@ -101,7 +101,7 @@ class AsymptoticExpansionGenerators(SageObject):
The asymptotic expansions currently in this class include:
- :meth:`~harmonic_number`
- :meth:`~HarmonicNumber`
- :meth:`~Stirling`
- :meth:`~log_Stirling`
- :meth:`~Binomial_kn_over_n`
Expand Down Expand Up @@ -299,7 +299,7 @@ def log_Stirling(var, precision=None, skip_constant_summand=False):


@staticmethod
def harmonic_number(var, precision=None, skip_constant_summand=False):
def HarmonicNumber(var, precision=None, skip_constant_summand=False):
r"""
Return the asymptotic expansion of a harmonic number.
Expand All @@ -322,12 +322,12 @@ def harmonic_number(var, precision=None, skip_constant_summand=False):
EXAMPLES::
sage: asymptotic_expansions.harmonic_number('n', precision=5)
sage: asymptotic_expansions.HarmonicNumber('n', precision=5)
log(n) + euler_gamma + 1/2*n^(-1) - 1/12*n^(-2) + 1/120*n^(-4) + O(n^(-6))
TESTS::
sage: asymptotic_expansions.harmonic_number('n')
sage: asymptotic_expansions.HarmonicNumber('n')
log(n) + euler_gamma + 1/2*n^(-1) - 1/12*n^(-2) + 1/120*n^(-4)
- 1/252*n^(-6) + 1/240*n^(-8) - 1/132*n^(-10)
+ 691/32760*n^(-12) - 1/12*n^(-14) + 3617/8160*n^(-16)
Expand All @@ -341,20 +341,20 @@ def harmonic_number(var, precision=None, skip_constant_summand=False):
::
sage: asymptotic_expansions.harmonic_number(
sage: asymptotic_expansions.HarmonicNumber(
....: 'n', precision=5, skip_constant_summand=True)
log(n) + 1/2*n^(-1) - 1/12*n^(-2) + 1/120*n^(-4) + O(n^(-6))
sage: _.parent()
Asymptotic Ring <n^ZZ * log(n)^ZZ> over Rational Field
sage: for p in range(5):
....: print asymptotic_expansions.harmonic_number(
....: print asymptotic_expansions.HarmonicNumber(
....: 'n', precision=p)
O(log(n))
log(n) + O(1)
log(n) + euler_gamma + O(n^(-1))
log(n) + euler_gamma + 1/2*n^(-1) + O(n^(-2))
log(n) + euler_gamma + 1/2*n^(-1) - 1/12*n^(-2) + O(n^(-4))
sage: asymptotic_expansions.harmonic_number('m', precision=5)
sage: asymptotic_expansions.HarmonicNumber('m', precision=5)
log(m) + euler_gamma + 1/2*m^(-1) - 1/12*m^(-2) + 1/120*m^(-4) + O(m^(-6))
"""
if not skip_constant_summand:
Expand Down

0 comments on commit bedd23a

Please sign in to comment.