Gecode / gecode

Generic Constraint Development Environment
https://www.gecode.org
Other
283 stars 76 forks source link

Fix the int_pow decomposition when using potentially negative exponents #159

Closed Dekker1 closed 1 year ago

Dekker1 commented 1 year ago

The FlatZinc decomposition of "int_pow" would use a zero default value for the base even raised to a negative value, causing unsatisfiability. This PR introduces a simpler decomposition that moves the default values for impossible exponent values to the result.

zayenz commented 1 year ago

Thanks @Dekker1 !