#1956: implement multivariate power series arithmetic
---------------------------------------------------------------------------------------------------+
Reporter: was
| Owner: pernici
Type: enhancement
| Status: needs_review
Priority: major
| Milestone: sage-4.6.1
Component: commutative algebra
| Keywords: multivariate power series
Author: Niles Johnson
| Upstream: N/A
Reviewer: Martin Albrecht, Simon King
| Merged:
Work_issues: multivariate series on 1 generator should remain different from a
univariate series |
---------------------------------------------------------------------------------------------------+
Comment(by pernici):
I think that random_element does not give good random multivariate series;
the lowest total degree is usually not zero
{{{
sage: R.<x,y> = QQ[[]]
sage: def mval(p,N):
....: print '%.2f' % (sum([sum(R.random_element(p,p).exponents()[0])
for _ in range(N)])/float(N))
....:
sage: mval(20,100)
3.94
sage: mval(100,100)
8.34
}}}
while in the univariate case it is usually zero
{{{
sage: R.<x> = QQ[[]]
sage: def mval(p,N):
....: print '%.2f' % (sum([R.random_element(p,p).exponents()[0] for _
in range(N)])/float(N))
....:
sage: mval(20,100)
0.02
sage: mval(100,100)
0.01
}}}
As a quick fix to get pseudo random series I changed the benchmark file
mu.sage
shifting by 1 the variables in the random polynomials
{{{
sage: R.<x,y> = QQ[[]]
sage: for prec in range(10,50,10):
....: p = R.random_element(prec,prec)
....: p1 = p.polynomial()(x+1,y+1) + R.O(prec)
....: print 'prec=',prec
....: %timeit p^10
....: %timeit p1^10
....:
prec= 10
625 loops, best of 3: 752 µs per loop
125 loops, best of 3: 3.77 ms per loop
prec= 20
125 loops, best of 3: 3.4 ms per loop
25 loops, best of 3: 25.2 ms per loop
prec= 30
125 loops, best of 3: 5.14 ms per loop
5 loops, best of 3: 151 ms per loop
prec= 40
25 loops, best of 3: 13.3 ms per loop
5 loops, best of 3: 484 ms per loop
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/1956#comment:72>
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.