File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 101
101
"""
102
102
evalpoly(x, p)
103
103
104
- Evaluate the polynomial ``\\ sum_k p[k] x^{k-1}`` for the coefficients `p[1]`, `p[2]`, ...;
104
+ Evaluate the polynomial ``\\ sum_k x^{k-1} p[k] `` for the coefficients `p[1]`, `p[2]`, ...;
105
105
that is, the coefficients are given in ascending order by power of `x`.
106
106
Loops are unrolled at compile time if the number of coefficients is statically known, i.e.
107
107
when `p` is a `Tuple`.
210
210
"""
211
211
@evalpoly(z, c...)
212
212
213
- Evaluate the polynomial ``\\ sum_k c[k] z^{k-1}`` for the coefficients `c[1]`, `c[2]`, ...;
213
+ Evaluate the polynomial ``\\ sum_k z^{k-1} c[k] `` for the coefficients `c[1]`, `c[2]`, ...;
214
214
that is, the coefficients are given in ascending order by power of `z`. This macro expands
215
215
to efficient inline code that uses either Horner's method or, for complex `z`, a more
216
216
efficient Goertzel-like algorithm.
You can’t perform that action at this time.
0 commit comments