Hi!
El jue, 31-03-2005 a las 18:05 +0200, Amoss escribió:
Hi Guys,
This may be a bug (or it may already be fixed), I'm using a slightly older version of ciao and I can't login to a machine with the up to date release at the moment. Apologies if this has already been fixed (Is there a web searchable archive of this list somewhere?)
I'm using Ciao-1.10 and I get the same res as you, but I think it's not a bug in CIAO, try:
?- Y is 1 mod 8.0.
Y = 9 ? ;
no ?- Y is 1 mod 8.
Y = 1 ? ;
no ?-
As you can see, you're using a integer operator (mod) with real numbers. When used with integers, it gives the correct answer, but I believe mod has an undefined value when used with reals.
?- X is (2**3).
X = 8.0 ? ;
no ?-
Regards,
Easy to reproduce;
?- X is (2**3).
X = 8.0 ? ;
no ?- X is 1 mod 8.
X = 1 ? ;
no ?- X is 1 mod (2**3).
X = 9 ? ;
no
I'm fairly confident that 1%8 isn't 9... ;^)