#19822: Fast polynomial evaluation fmpz_poly/ZZX with mpfr/mpfi input
-------------------------------------+-------------------------------------
Reporter: vdelecroix | Owner:
Type: enhancement | Status: needs_work
Priority: major | Milestone: sage-7.0
Component: algebra | Resolution:
Keywords: | Merged in:
Authors: Vincent Delecroix | Reviewers: Jeroen Demeyer
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/vdelecroix/19822 | 5562a78b592125e698021743d545f176cc0604bb
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by vdelecroix):
I attached files which compare the various possibilities for Horner
scheme:
- `eval1`: the current version which is straightforward Horner expansion
(red)
- `eval2`: the same but skip addition if the term is 0 (green)
- `eval3`: use `mpfr_pow` (blue)
There are files `degree_{deg}_{prec}.png` for fixed degrees where the
number of terms vary and `poly_{deg}_{nb_terms}.png` where the percision
vary.
[[Image(degree_20_64.png,45%)]] [[Image(degree_20_256.png,45%)]]
[[Image(poly_20_2.png,45%)]] [[Image(poly_20_13.png,45%)]]
`eval2` seems superior over `eval1`. But `eval3` seems only interesting
for very sparse polynomials or very large precision. Indeed, for half
dense polynomials (degree=20, nb_terms=13), `eval3` gets better than the
other two around prec=2^8^
--
Ticket URL: <http://trac.sagemath.org/ticket/19822#comment:36>
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 https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.