JuliaAlgebra / DynamicPolynomials.jl

Multivariate polynomials implementation of commutative and non-commutative variables
Other
60 stars 21 forks source link

allow setting ID in PolyVar, and make it a UInt #90

Closed shashi closed 3 years ago

shashi commented 3 years ago

this will allow one to set a hash of Sym as the ID. Makes a lot of simplifications work much better in Symbolics https://github.com/JuliaSymbolics/SymbolicUtils.jl/pull/231 for example:

simplify(simplify_fractions(sin(x)/cos(x) + cos(x)/sin(x)))
# gives

1/(cos(x)*sin(x))
blegat commented 3 years ago

LGTM, let's see if CI passes

shashi commented 3 years ago

Turns out we actually don't need this change, and it was misguided anyway because it's hard to make sure hashes are unique. I'm ok with closing this.