On 30/05/11 13:17, Sergey Dymchenko wrote: > Hi! > > There is mod built-in in ECLiPSe, but according to > http://eclipseclp.org/doc/bips/lib/ic/index.html it's impossible to > use it in constraints. > And I don't see a way to construct mod with arithmetic expression that > can be used inside the constraints. > Any suggestions? You could use the definition of modulus. By definition of integer division, A mod B is the number X such that X + Y*B = A and such that X is between 0 and B-1 (for some integer Y, usually called "quotient"). Cheers, Marco -- Marco Gavanelli, Ph.D. in Computer Science Dept of Engineering University of Ferrara Tel/Fax +39-0532-97-4833 http://www.ing.unife.it/docenti/MarcoGavanelli/Received on Mon May 30 2011 - 11:51:51 CEST
This archive was generated by hypermail 2.3.0 : Wed Sep 25 2024 - 15:13:20 CEST