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

Commit

Permalink
doc of rmul
Browse files Browse the repository at this point in the history
  • Loading branch information
dkrenn committed Aug 28, 2015
1 parent d59304b commit 57cd39f
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion src/sage/rings/asymptotic/asymptotic_ring.py
Original file line number Diff line number Diff line change
Expand Up @@ -786,7 +786,7 @@ def _mul_term_(self, term):

def _mul_(self, other):
r"""
Multiply ``other`` to this asymptotic expression.
Multiply this asymptotic expression by another asymptotic expression ``other``.
INPUT:
Expand Down Expand Up @@ -817,6 +817,24 @@ def _mul_(self, other):


def _rmul_(self, other):
r"""
Multiply this asymptotic expression by an element ``other`` of its
coefficient ring.
INPUT:
- ``other`` -- an element of the coefficient ring.
OUTPUT:
An :class:`AsymptoticExpression`.
TESTS::
sage: A.<a> = AsymptoticRing(growth_group='QQ^a * a^QQ * log(a)^QQ', coefficient_ring=ZZ)
sage: 2*a
2*a
"""
from sage.rings.asymptotic.term_monoid import TermMonoid
E = TermMonoid('exact', asymptotic_ring=self.parent())
e = E(self.parent().growth_group.one(), coefficient=other)
Expand Down

0 comments on commit 57cd39f

Please sign in to comment.