Skip to content

Commit 3459d22

Browse files
sethaxenKristofferC
authored andcommitted
Correct evalpoly docstring (#35821)
(cherry picked from commit 686052b)
1 parent a340bf1 commit 3459d22

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

base/math.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ end
101101
"""
102102
evalpoly(x, p)
103103
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]`, ...;
105105
that is, the coefficients are given in ascending order by power of `x`.
106106
Loops are unrolled at compile time if the number of coefficients is statically known, i.e.
107107
when `p` is a `Tuple`.
@@ -210,7 +210,7 @@ end
210210
"""
211211
@evalpoly(z, c...)
212212
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]`, ...;
214214
that is, the coefficients are given in ascending order by power of `z`. This macro expands
215215
to efficient inline code that uses either Horner's method or, for complex `z`, a more
216216
efficient Goertzel-like algorithm.

0 commit comments

Comments
 (0)