#16812: use FLINT to speed up Chebyshev T polynomial creation
-------------------------------------+-------------------------------------
       Reporter:  rws                |        Owner:
           Type:  enhancement        |       Status:  needs_work
       Priority:  major              |    Milestone:  sage-6.4
      Component:  symbolics          |   Resolution:
       Keywords:  flint, speedup     |    Merged in:
        Authors:  Ralf Stephan       |    Reviewers:
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  u/maldun/use_flint_to_speed_up_chebyshev_t_polynomial_creation|  
59d04f5fd05174cc0197424363db69c420e3e8f1
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------

Comment (by maldun):

 {{{
 sage: T = chebyshev_T(100000000000,x)
 Exception (FLINT memory_manager). Unable to allocate memory.
 ---------------------------------------------------------------------------
 RuntimeError                              Traceback (most recent call
 last)
 <ipython-input-1-bef10d0acafb> in <module>()
 ----> 1 T = chebyshev_T(Integer(100000000000),x)

 /home/maldun/sage/sage-6.3/local/lib/python2.7/site-
 packages/sage/functions/orthogonal_polys.pyc in __call__(self, n, *args,
 **kwds)
     624         # If n is an integer: consider the polynomial as an
 algebraic (not symbolic) object
     625         if n in ZZ and not kwds.get('hold', False):
 --> 626             ret = self._eval_(n, *args, **kwds)
     627             if ret is not None:
     628                 return ret

 /home/maldun/sage/sage-6.3/local/lib/python2.7/site-
 packages/sage/functions/orthogonal_polys.pyc in _eval_(self, n, x, *args,
 **kwds)
     679             if ((is_Polynomial(x) and
 x.parent().base_ring().is_exact()) or
     680                 (is_Expression(x) and (not x.is_numeric()) and ((n
 > 10000) or (n < -10000)))):
 --> 681                 return self.eval_algebraic(n, x)
     682             else:
     683                 return self.eval_recursive(n, x)

 /home/maldun/sage/sage-6.3/local/lib/python2.7/site-
 packages/sage/functions/orthogonal_polys.pyc in eval_algebraic(self, n,
 arg)
     918                 n = -n
     919             R = PolynomialRing(ZZ, 'x')
 --> 920             pol = Polynomial_integer_dense_flint.chebyshev_T(n, R,
 R.gen())
     921             if is_PolynomialRing(P):
     922                 pol = pol.subs({pol.parent().gen():arg})

 /home/maldun/sage/sage-6.3/local/lib/python2.7/site-
 packages/sage/rings/polynomial/polynomial_integer_dense_flint.so in
 
sage.rings.polynomial.polynomial_integer_dense_flint.Polynomial_integer_dense_flint.chebyshev_T
 
(build/cythonized/sage/rings/polynomial/polynomial_integer_dense_flint.cpp:14398)()

 /home/maldun/sage/sage-6.3/local/lib/python2.7/site-
 packages/sage/ext/c_lib.so in sage.ext.c_lib.sig_raise_exception
 (build/cythonized/sage/ext/c_lib.c:1040)()

 RuntimeError: Aborted

 }}}

 Recursive version works without abort

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