-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TIR][Arith] Support negative coeff in ModularSet
Prior to this commit, any use of negative coefficients in `ModularSet` would result in an error. This included cases where a constraint is being entered, such as `floormod(i, -2)==0` appearing as the condition of an if/else block. These negative indices can also arise as intermediate simplification steps produced by `CanonicalSimplifier`, such as `floormod(-i,2)` being canonicalized to `floormod(i,-2)`. This commit adds support for negative coefficients in `ModularSet`, using the same sign convention as is used by `CanonicalSimplifier` for negative denominators, and adds unit tests to verify that sign convention.
- Loading branch information
1 parent
b389d4d
commit b76c70a
Showing
3 changed files
with
45 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters