#10720: nth_root in power series
-----------------------------------+----------------------------------------
Reporter: pernici | Owner: pernici
Type: defect | Status: needs_review
Priority: minor | Milestone: sage-4.6.2
Component: commutative algebra | Keywords: power series
Author: mario pernici | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
-----------------------------------+----------------------------------------
Comment(by pernici):
With trac_10720_power_series_nth_root_4.patch
nth_root and inversion become faster for series on
polynomial rings, when used together with
trac_10480_fast_PowerSeries_poly_multiplication-alternative.patch
from ticket #10480 (otherwise these functions perform as without the
patch).
In the following benchmarks apply
trac_karatsuba_improvements.patch and
trac_10480_fast_PowerSeries_poly_multiplication-alternative.patch,
trac_10720_power_series_nth_root_2.patch and
trac_10720_power_series_nth_root_3.patch;
in (2) apply also the new patch
{{{
sage: N = 2
sage: R= PolynomialRing(QQ,N,'x')
sage: x = R.gens()
sage: S.<t> = R[[]]
sage: sx = sum(x)
sage: prec = 15
sage: p = (t.exp(prec)).subs({t:t*sx})
sage: %time p1 = p^-1
sage: %time p1 = p.nth_root(2)
}}}
Inversion benchmark:
{{{
N prec (1) (2)
2 15 0.06 0.01
3 15 2.1 0.07
4 15 58 0.5
5 15 1440 3.4
}}}
Square root benchmark:
{{{
N prec (1) (2)
2 15 0.15 0.03
3 15 5.2 0.31
4 15 161 3.3
}}}
The speedup is large because the terms with high degree in `t`
are large polynomials, due to the combinatorial
possibilities with several variables; using _mul_ instead of _mul_trunc
several products involving these large polynomials are computed and
later truncated away.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10720#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.