]> Repositorios git - scryer-prolog.git/commitdiff
Compute correctly the domain of the remainder
authornotoria <[email protected]>
Sat, 27 May 2023 11:47:14 +0000 (13:47 +0200)
committernotoria <[email protected]>
Sat, 27 May 2023 11:47:14 +0000 (13:47 +0200)
src/lib/clpz.pl

index 4cdcdc9acb9df0ab9214287051cc8ea7d5006502..8f9c6bf84f552721b5095b587b9279892eec2f6d 100644 (file)
@@ -5153,7 +5153,7 @@ run_propagator(pmodz(X,Y,Z), MState) -->
                       domain_remove_smaller_than(ZD3, ZMin, ZD5) },
                     fd_put(Z, ZD5, ZPs)
                     % queue_goal(Z in ZMin..0)
-                ;   { fd_get(Y, _, n(YL), n(YU), _) } ->
+                ;   { fd_get(Y, _, n(YL), n(YU), _), YL < 0, YU > 0 } ->
                     ZMin is YL + 1,
                     ZMax is YU - 1,
                     { fd_get(Z, ZD1, ZPs),