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

expand seems not correct #538

Open
AmplitudeGravity opened this issue Feb 26, 2022 · 1 comment
Open

expand seems not correct #538

AmplitudeGravity opened this issue Feb 26, 2022 · 1 comment

Comments

@AmplitudeGravity
Copy link

AmplitudeGravity commented Feb 26, 2022

big(3)^100 

is 515377520732011331036461129765621272702107522001

then I tried Symbolics, it get different result.

using Symbolics
@variables x y
f=expand((x+y)^100);
substitute(f,Dict(x => big(1),y=> big(2)))

the output is 82584274084965915071296193740091271394366417

strange!
BTW, expand((x+y)^50) works

┆Issue is synchronized with this Trello card by Unito

@shashi
Copy link
Member

shashi commented Feb 28, 2022

Seems to be integer overflow in DynamicPolynomials...

julia> @polyvar x y
(x, y)

julia> p = (x+y)^100

has negative coefficients.

I wish it handled this automatically because SymbolicUtils does not see the process where an integer grows too big for Int.

cc @blegat

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

2 participants