We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eef6fac commit 22f19e8Copy full SHA for 22f19e8
README.md
@@ -52,6 +52,12 @@ Poly(0.5 - 0.5x^2)
52
```
53
54
Note that operations involving polynomials with different variables will error.
55
+```julia
56
+julia> p = Poly([1, 2, 3], :x)
57
+julia> q = Poly([1, 2, 3], :s)
58
+julia> p + q
59
+ERROR: Polynomials must have same variable.
60
+```
61
62
To get the degree of the polynomial use `degree` method
63
@@ -65,13 +71,6 @@ julia> degree(p-p)
65
71
0
66
72
67
73
68
-```julia
69
-julia> p = Poly([1, 2, 3], :x)
70
-julia> q = Poly([1, 2, 3], :s)
-julia> p + q
-ERROR: Polynomials must have same variable.
-```
74
-
75
#### polyval(p::Poly, x::Number)
76
Evaluate the polynomial `p` at `x`.
77
0 commit comments