You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
*`ImmutablePolynomial` – Standard basis polynomials backed by a [Tuple type](https://docs.julialang.org/en/v1/manual/functions/#Tuples-1) for faster evaluation of values
20
-
*`SparsePolynomial` – Standard basis polynomial backed by a [dictionary](https://docs.julialang.org/en/v1/base/collections/#Dictionaries-1) to hold sparse high-degree polynomials
21
-
*`LaurentPolynomial` – [Laurent polynomials](https://docs.julialang.org/en/v1/base/collections/#Dictionaries-1), `a(x) = aₘ xᵐ + … + aₙ xⁿ``m ≤ n`, `m,n ∈ ℤ` backed by an [offset array](). For example, if `m<0` and `n>0`, `a(x) = aₘ xᵐ + … + a₋₁ x⁻¹ + a₀ + a₁ x + … + aₙ xⁿ`
*`ImmutablePolynomial` – standard basis polynomials backed by a [Tuple type](https://docs.julialang.org/en/v1/manual/functions/#Tuples-1) for faster evaluation of values
20
+
*`SparsePolynomial` – standard basis polynomial backed by a [dictionary](https://docs.julialang.org/en/v1/base/collections/#Dictionaries-1) to hold sparse high-degree polynomials
21
+
*`LaurentPolynomial` – [Laurent polynomials](https://docs.julialang.org/en/v1/base/collections/#Dictionaries-1), `a(x) = aₘ xᵐ + … + aₙ xⁿ``m ≤ n`, `m,n ∈ ℤ` backed by an [offset array](); for example, if `m<0` and `n>0`, `a(x) = aₘ xᵐ + … + a₋₁ x⁻¹ + a₀ + a₁ x + … + aₙ xⁿ`
22
22
*`ChebyshevT` – [Chebyshev polynomials](https://en.wikipedia.org/wiki/Chebyshev_polynomials) of the first kind
23
23
24
24
## Usage
25
25
26
26
### Construction and Evaluation
27
27
28
-
Construct a polynomial from its coefficients, lowest order first.
28
+
Construct a polynomial from an array (a vector) of its coefficients, lowest order first.
29
29
30
30
```julia
31
31
julia>Polynomial([1,0,3,4])
32
32
Polynomial(1+3x^2+4x^3)
33
33
```
34
34
35
-
An optional variable parameter can be added.
35
+
Optionally, the variable of the polynomial can be specified.
36
36
37
37
```julia
38
38
julia>Polynomial([1,2,3], :s)
@@ -84,7 +84,7 @@ julia> q ÷ p # `div`, also `rem` and `divrem`
84
84
Polynomial(0.25-0.5x)
85
85
```
86
86
87
-
Note that operations involving polynomials with different variables will error.
87
+
Operations involving polynomials with different variables will error.
88
88
89
89
```julia
90
90
julia> p =Polynomial([1, 2, 3], :x)
@@ -95,7 +95,7 @@ ERROR: Polynomials must have same variable.
95
95
96
96
### Integrals and Derivatives
97
97
98
-
Integrate the polynomial `p` term by term, optionally adding constant
98
+
Integrate the polynomial `p` term by term, optionally adding a constant
99
99
term `k`. The degree of the resulting polynomial is one higher than the
100
100
degree of `p`.
101
101
@@ -119,8 +119,7 @@ Polynomial(3 - 2x)
119
119
120
120
121
121
Return the roots (zeros) of `p`, with multiplicity. The number of
122
-
roots returned is equal to the degree of `p`. By design, this is not type-stable,
123
-
the returned roots may be real or complex.
122
+
roots returned is equal to the degree of `p`. By design, this is not type-stable, the returned roots may be real or complex.
0 commit comments