]> Repositorios git - scryer-prolog.git/commit
Fix `min/2` and `max/2`
authornotoria <[email protected]>
Sun, 7 Jan 2024 19:14:32 +0000 (20:14 +0100)
committernotoria <[email protected]>
Sun, 7 Jan 2024 19:14:32 +0000 (20:14 +0100)
commitfe371ff1d100888ebe2b25f4454c6145437ee207
treee0649704ca9133bbefa1525bc668af18a3494b03
parent92b85d4ba607877f5562633435c8e583eb54fdcc
Fix `min/2` and `max/2`

?- X in 0..1, Y in 2..4, Z #= max(X,Y).
   clpz:(X in 0..1), clpz:(Z#=max(X,Y)), clpz:(Z in 2..4), clpz:(Z#>=Y), clpz:(Y in 2..4). % unexpected.
?- X in 0..1, Y in 2..4, Z #= max(Y,X).
   Y = Z, clpz:(X in 0..1), clpz:(Y in 2..4).
src/lib/clpz.pl