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

Commit

Permalink
Merge branch 'u/dkrenn/t/19961' of trac.sagemath.org:sage into t/19946
Browse files Browse the repository at this point in the history
* 'u/dkrenn/t/19961' of trac.sagemath.org:sage:
  Trac #19961: document rpow
  • Loading branch information
dkrenn committed Jan 26, 2016
2 parents 1471336 + 9f9a23f commit 101e4de
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions src/sage/rings/asymptotic/asymptotic_ring.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,33 @@
sage: (1 + 1/z + O(1/z^5))^(1 + 1/z)
1 + z^(-1) + z^(-2) + 1/2*z^(-3) + 1/3*z^(-4) + O(z^(-5))
.. NOTE::
In the asymptotic ring
::
sage: M.<n> = AsymptoticRing(growth_group='QQ^n * n^QQ', coefficient_ring=ZZ)
the operation
::
sage: (1/2)^n
Traceback (most recent call last):
...
ValueError: 1/2 is not in Exact Term Monoid QQ^n * n^QQ
with coefficients in Integer Ring. ...
fails, since the rational `1/2` is not contained in `M`. You can use
::
sage: n.rpow(1/2)
(1/2)^n
instead. Another way is to use a larger coefficent ring::
sage: M_QQ.<n> = AsymptoticRing(growth_group='QQ^n * n^QQ', coefficient_ring=QQ)
sage: (1/2)^n
(1/2)^n
Multivariate Arithmetic
^^^^^^^^^^^^^^^^^^^^^^^
Expand Down

0 comments on commit 101e4de

Please sign in to comment.