paulv66 wrote:

Patrick, can you clarify please? Also, is zero allowed as the denominator in a mod cell? For example, could you give 2 mod 0 as a solution for a cage with value mod 2? Or will a mod cage with zero in it always have to have value zero?

No, for a divisor zero the modulo operation is not defined, so it's not allowed.

(

**edit:** I'll double-check this too, I've seen a definition where "x mod 0 = x", so maybe that would work)

When the divisor is negative, the result is "implementation dependent" as they say

(so it depends on the programming language used). In my case, the language is C++:

here the remainder has the same sign as the dividend.

**But** a puzzle generator script is written in Perl, which uses the convention

that the remainder has the same sign as the divisor..

I need to check if this causes any problems for the puzzle generation, will keep you posted.