Open LaurenceA opened 10 years ago
It is nice, and intuitive to define polynomials using,
(:yo + 1)^2
which is easy to do by overloading mathematical operators to take symbols and return polynomials, e.g.
for f = [+, -, *, /] f(n::Number, s::Symbol) = f(n, Poly([1, 0], string(s))) f(s::Symbol, n::Number) = f(Poly([1, 0], string(s)), n) end
It is nice, and intuitive to define polynomials using,
which is easy to do by overloading mathematical operators to take symbols and return polynomials, e.g.