[Scipy-tickets] [SciPy] #610: Documenting caveats in evaluation of high-order orthogonal polynomials

SciPy scipy-tickets@scipy....
Fri Feb 22 15:46:50 CST 2008

#610: Documenting caveats in evaluation of high-order orthogonal polynomials
 Reporter:  pv             |       Owner:  somebody
     Type:  enhancement    |      Status:  new     
 Priority:  low            |   Milestone:  0.7     
Component:  scipy.special  |     Version:          
 Severity:  normal         |    Keywords:          
 The orthogonal polynomial functions in scipy.special return poly1d objects
 that represent polynomials in terms of their coefficients. It might not be
 obvious that this means that some high-order polynomials cannot be
 represented accurately:
 >>> import scipy, scipy.special
 >>> for n in xrange(0,70,10): print n,
 scipy.special.chebyt(n)(scipy.cos(z)) - scipy.cos(n*z)
 0 0.0
 10 3.80806497446e-14
 20 1.94978477808e-10
 30 2.65364360286e-06
 40 -0.0237953834481
 50 -114.714051465
 60 272370.465462
 This should probably be documented in the docstrings of the functions in

 Also, a way to evaluate the polynomials stably at some points could be
 useful to include in Scipy. There is already a function OTHPL in
 scipy.special.specfun that evaluates Tn, Un, Ln and Hn, however. (It is
 not exposed in scipy.special and has no docstring, however.)

Ticket URL: <http://scipy.org/scipy/scipy/ticket/610>
SciPy <http://www.scipy.org/>
SciPy is open-source software for mathematics, science, and engineering.

More information about the Scipy-tickets mailing list