Ticket #1738 (closed defect: duplicate)
[with patch] fraction field __pow__ doesn't handle negative exp. elegantly
| Reported by: | jbmohler | Owned by: | was |
|---|---|---|---|
| Priority: | major | Milestone: | sage-2.10 |
| Component: | algebraic geometry | Keywords: | |
| Cc: | Work issues: | ||
| Report Upstream: | Reviewers: | ||
| Authors: | Merged in: | ||
| Dependencies: | Stopgaps: |
Description
Negative exponents put fraction field elements in the denominator of a fraction field element.
sage: R.<x>=ZZ[] sage: (1/x)^-3 1/(1/x^3)
With the patch:
sage: R.<x>=ZZ[] sage: (1/x)^-3 x^3
Attachments
Change History
comment:1 Changed 5 years ago by was
It looks good to me except change the somewhat too verbose
sage: x = PolynomialRing(RationalField(),'x').gen()
to one of the following (take your pick):
sage: x = polygen(QQ, 'x')
or
sage: R.<x> = QQ[]
or
sage: x = PolynomialRing(QQ,'x').gen()
I think it is important that the docstrings give illustrations of good usage of Sage.
Note: See
TracTickets for help on using
tickets.

