The constraints (A#=10*B+C) should be identical to
(Z#=10*B, A#=Z+C), no ? (Ok, I'm aware of differences
in the propagation and of overflow risk...).
Does anybody know why the following fraction0 fails
whereas fractions1 succeeds (with gnu prolog 1.2.8) ?
Thanks in advance.
-----------------------------------------------
fractions0(Ls) :-
Ls = [A,B,C,D,E,F,G,H,I],
fd_domain(Ls, 1, 9),
fd_all_different(Ls),
A*(10*E+F)*(10*H+I) + D*(10*B+C)*(10*H+I) +
G*(10*B+C)*(10*E+F) #= (10*B+C)*(10*E+F)*(10*H+I),
fd_labelingff(Ls).
fractions1(Ls) :-
Ls = [A,B,C,D,E,F,G,H,I],
fd_domain(Ls, 1, 9),
fd_all_different(Ls),
BC #= 10*B+C, EF #= 10*E+F, HI #= 10*H+I,
A*EF*HI + D*BC*HI + G*BC*EF #= BC*EF*HI,
fd_labelingff(Ls).
___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com
_______________________________________________
Users-prolog mailing list
address@hidden
http://mail.gnu.org/mailman/listinfo/users-prolog