From: notoria Date: Sat, 27 May 2023 11:47:14 +0000 (+0200) Subject: Compute correctly the domain of the remainder X-Git-Tag: v0.9.2~132^2 X-Git-Url: https://git.sagredo.dev/?a=commitdiff_plain;h=495df8846addb8581f20c6b212dca1a89351f717;p=scryer-prolog.git Compute correctly the domain of the remainder --- diff --git a/src/lib/clpz.pl b/src/lib/clpz.pl index 4cdcdc9a..8f9c6bf8 100644 --- a/src/lib/clpz.pl +++ b/src/lib/clpz.pl @@ -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),