Automatically promote to BigInt when about to overflow
It would be nice if DP automatically promoted coefficients to big nums when they are too big to fit in Int.
See
julia> @polyvar x y
(x, y)
julia> p = (x+y)^100
is wrong, but (x+y)^50 is correct.
from https://github.com/JuliaSymbolics/Symbolics.jl/issues/538
Agreed, this would be a nice feature to have
@blegat and @shashi FWIW I tried out the newly released MultivariatePolynomials = "0.4.4" with the the latest DynamicPolynomials and my version of the bug is now fixed.
I had to pin `MultivariatePolynomials = "0.4.4"`` manually though. You might want to consider releesing a new version of this repo which lowerbounds that (and @shashi maybe consider a SymbolicUtils which lowerbounds a new DynamicPolynomials).
Regardless, thanks so much for fixing this!
What about type stability, though? Surely type stability is paramount? This proposal seems like it would compromise type stability.