#17955: LaurentSeriesRing and series_precision
-------------------------+-------------------------------------------------
Reporter: behackl | Owner:
Type: defect | Status: new
Priority: major | Milestone: sage-6.6
Component: symbolics | Keywords: series_precision, asymptotics
Merged in: | Authors:
Reviewers: | Report Upstream: N/A
Work issues: | Branch:
Commit: | Dependencies:
Stopgaps: |
-------------------------+-------------------------------------------------
Currently, `LaurentSeriesRing` caches without replacing the default
`default_prec=None` to the global series precision obtainable by
`sage.default.series_precision()` . This leads to the following behavior:
{{{
sage: set_series_precision(5)
sage: R.<x> = LaurentSeriesRing(ZZ)
sage: 1/(1-x)
1 + x + x^2 + x^3 + x^4 + O(x^5)
sage: set_series_precision(3)
sage: R.<x> = LaurentSeriesRing(ZZ)
sage: 1/(1-x)
1 + x + x^2 + x^3 + x^4 + O(x^5)
}}}
Instead, the (second) output should be
{{{
sage: 1/(1-x)
1 + x + x^2 + O(x^3)
}}}
This is fixed by setting `default_prec` to the corresponding global series
precision *before* caching the parent.
--
Ticket URL: <http://trac.sagemath.org/ticket/17955>
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.