[Numpy-discussion] Polynomial evaluation inconsistencies
wieser.eric+numpy at gmail.com
Sat Jun 30 17:30:03 EDT 2018
“the intuitive way” is the decreasing powers.
An argument against this is that accessing the ith power of x is spelt:
- x.coeffs[i] for increasing powers
- x.coeffs[-i-1] for decreasing powers
The former is far more natural than the latter, and avoids a potential
If I ask someone to write down the coefficients of a polynomial I don’t
think anyone would start from c
You wouldn’t? I’d expect to see
[image: f(x) = a_3x^3 + a_2x^2 + a_1x + a_0]
[image: f(x) = a_0x^3 + a_1x^2 + a_2x + a_3]
Sure, I’d write it starting with the highest power, but I’d still number my
coefficients to match the powers.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion