#3979: Power series composition messes up precision
--------------------------------------------------------+-------------------
Reporter: kedlaya | Owner:
somebody
Type: defect | Status:
needs_work
Priority: critical | Milestone:
sage-4.7.2
Component: algebra | Keywords:
power series, composition, precision
Work_issues: | Upstream: N/A
Reviewer: Kiran Kedlaya, Luis Felipe Tabera Alonso | Author:
Francis Clarke
Merged: | Dependencies:
--------------------------------------------------------+-------------------
Changes (by lftabera):
* status: needs_review => needs_work
* reviewer: => Kiran Kedlaya, Luis Felipe Tabera Alonso
Comment:
Some problems I have found
This should work
{{{
sage: x=polygen(QQ)
sage: f = 1 + 3*x + O(x^2)
sage: f(x)
...
ValueError
}}}
This should raise an error:
{{{
sage: x = LaurentSeriesRing(QQ,'x').gen()
sage: f = x + O(x^2)
sage: f(~x)
O(x^-2)
}}}
You cannot substitute x by 1/x on a power series unless it is a Laurent
polynomial.
Suggestions, comments:
On file laurent_series_ring_element.pyx
@446 def laurentpolynomial(...
Improve the documentation. By what is written it seems that the output
should be a Laurent polynomial but the method actually returns a Laurent
power series.
@1141 __call__ documentation, specify that x needs to have a valuation at
least 1.
@1165 raise ValueError, "must not specify %s keyword and positional
argument" % name
Add a doctest to the __call__ method with both keywords and positional
arguments one that works (name!= keyword) and one that raises the error,
other possibilities welcomed.
On file multi_power_series_ring
@964,989 improve documentation, not clear if the input can be polynomials,
powerseries, powerseries + bigoh or in which ring is the result. If we can
use big_Oh in the input etc. Maybe for another ticket.
On file local_generic_element.pyx
@140 I would write: Returns self up to reduced precision `prec`.
On file polynomial_element.pyx
@461-467 doctest should go in the TESTS section.
@567 raise ValueError, "must not specify %s keyword and positional
argument" % name
On file power_series_mpoly
@74 Add documentation and a valid example to the __call__ method. Each
method or function that is modified need to have a correct documentation
and doctest.
On file power_series_poly
@290 raise ValueError, "must not specify %s keyword and positional
argument" % name
@936 This is a bug and should be fixed. This is a regression since this
works without the patch (except for the incorrect precision).
On file scheme.py
@178 temp2 = temp.exp().change_ring(ZZ)
Is there a reason you want a powerseries in ZZ instead of QQ?
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/3979#comment:8>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.