Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically promote to BigInt when about to overflow #110

Open
shashi opened this issue Feb 28, 2022 · 3 comments
Open

Automatically promote to BigInt when about to overflow #110

shashi opened this issue Feb 28, 2022 · 3 comments

Comments

@shashi
Copy link

shashi commented Feb 28, 2022

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 JuliaSymbolics/Symbolics.jl#538

@blegat
Copy link
Member

blegat commented Feb 28, 2022

Agreed, this would be a nice feature to have

@blegat blegat mentioned this issue Mar 18, 2022
@jlperla
Copy link

jlperla commented Mar 22, 2022

@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!

@nsajko
Copy link
Contributor

nsajko commented Nov 27, 2023

What about type stability, though? Surely type stability is paramount? This proposal seems like it would compromise type stability.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants