[Numpy-discussion] Polynomial evaluation inconsistencies

Maxwell Aifer maifer at haverford.edu
Sat Jun 30 17:33:22 EDT 2018


Interesting,  I wasn't aware that both conventions were widely used.

Speaking of series with inverse powers (i.e. Laurent series), I wonder how
useful it would be to create a class to represent expressions with integral
powers from -m to n. These come up in my work sometimes, and I usually
represent them with coefficient arrays ordered like this:

c[0]*x^0 + ... + c[n]*x^n + c[n+1]x^-m + ... + c[n+m+1]*x^-1

Because then with negative indexing you have:

c[-m]*x^-m + ... + c[n]*x^n

Still, these objects can't be manipulated as nicely as polynomials because
they aren't closed under integration and differentiation (you get log
terms).

Max


On Sat, Jun 30, 2018 at 4:56 PM, Charles R Harris <charlesr.harris at gmail.com
> wrote:

>
>
> On Sat, Jun 30, 2018 at 1:08 PM, Ilhan Polat <ilhanpolat at gmail.com> wrote:
>
>> I think restricting polynomials to time series is not a generic way and
>> quite specific.
>>
>
> I think more of complex analysis and it's use of series.
>
>
>> Apart from the series and certain filter design actual usage of
>> polynomials are always presented with decreasing order (control and signal
>> processing included because they use powers of s and inverse powers of z if
>> needed). So if that is the use case then probably it should go under a
>> namespace of `TimeSeries` or at least require an option to present it in
>> reverse.  In my opinion polynomials are way more general than that domain
>> and to everyone else it seems to me that "the intuitive way" is the
>> decreasing powers.
>>
>>
> In approximation, say by Chebyshev polynomials, the coefficients will
> typically drop off sharply above a certain degree. This has two effects,
> first, the coefficients that one really cares about are of low degree and
> should come first, and second, one can truncate the coefficients easily
> with c[:n]. So in this usage ordering by increasing degree is natural. This
> is the series idea, fundamental to analysis.
>
> Algebraically, interest centers on the degree of the polynomial, which
> determines the number of zeros and general shape, consequently from the
> point of view of the algebraist, working with polynomials of finite
> predetermined degree, arranging the coefficients in order of decreasing
> degree makes sense and is traditional.
>
> That said, I am not actually sure where the high to low ordering of
> polynomials came from. It could even be like the Arabic numeral system,
> which when read properly from right to left, has its terms arranged from
> small to greater. It may even be that the polynomial convention derives
> that of the Arabic numerals.
>
> <snip>
>
> Chuck
>
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion at python.org
> https://mail.python.org/mailman/listinfo/numpy-discussion
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20180630/710245ea/attachment-0001.html>


More information about the NumPy-Discussion mailing list