#18282: Fixes, cleanup and improvements to the default evaluation method for
univariate polynomials
-------------------------------------+-------------------------------------
       Reporter:  mmezzarobba        |        Owner:
           Type:  enhancement        |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-6.8
      Component:  commutative        |   Resolution:
  algebra                            |    Merged in:
       Keywords:                     |    Reviewers:
        Authors:  Marc Mezzarobba    |  Work issues:
Report Upstream:  N/A                |       Commit:
         Branch:                     |  84d6a1b874c241e8eed8196cc42fd9075be40206
  u/mmezzarobba/pol_call             |     Stopgaps:
   Dependencies:                     |
-------------------------------------+-------------------------------------

Comment (by bruno):

 In view of #18600 (and older sisters #18518 and #18585), I think
 `__call__` may be at the same time improved and adapted to high degree
 sparse polynomials: Basically, when a univariate polynomial `p` is
 evaluated on a value `v` (other than a symbolic variable), it uses a
 Horner scheme that ranges over all the coefficients of `p`, including the
 zeroes. One could easily modify lines 755-756 in
 `src/sage/rings/polynomial/polynomial_element.pyx` to make the loop ranges
 over the nonzero coefficients. I've not checked already whether it is
 slower in a sensible way for really dense polynomials or not, but it would
 be faster for sparse polynomials. And as a side benefit, one would be able
 to evaluate polynomials such as `x^2^500`, at least on "easy" values such
 as `1` or `-1` or on finite fields.

 What do you think of my proposal?

--
Ticket URL: <http://trac.sagemath.org/ticket/18282#comment:15>
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.

Reply via email to