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

constant folding fails for constant exponentiation #3948

Closed
charles-cooper opened this issue Apr 14, 2024 · 0 comments · Fixed by #3949
Closed

constant folding fails for constant exponentiation #3948

charles-cooper opened this issue Apr 14, 2024 · 0 comments · Fixed by #3949

Comments

@charles-cooper
Copy link
Member

charles-cooper commented Apr 14, 2024

Version Information

  • vyper Version (output of vyper --version): v0.4.0rc2

What's your issue about?

repro:

N: constant(uint256) = 3
N2: constant(uint256) = N**N

results in:

vyper.exceptions.InvalidOperation: Cannot apply an overflow check on exponentiation when both the base and power are unknown at compile-time. To perform this operation without an overflow check, use `pow_mod256(N, N)`

this appears to be a regression from 0.3.10

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

Successfully merging a pull request may close this issue.

1 participant