This is "normal" since gprolog does not test for integer overflow. The
same occurs with:
?- current_prolog_flag(max_integer,X),Y is X+1.
X = 268435455
Y = -268435456
Daniel
Dave Sworin a écrit :
|
I ran the following in gprolog 1.3.0. (I typed this in by
hand.)
--------------------------------------------------
| ?- current_prolog_flag(min_integer,MIN_INTEGER),X is
abs(MIN_INTEGER).
MIN_INTEGER = -268435456
X = -268435456
yes
| ?-
--------------------------------------------------
Can someone check this on another computer? I was working
under Fedora Core 4,
using the kernel 2.6.11-1.1369_FC4smp on a Pentium 4
processor with
Hyper-Threading Technology. I was pretty surprised to see
the result of an absolute
value that is negative.
Dave
|
--
Ce message a été vérifié par
MailScanner
pour des virus ou des polluriels et rien de
suspect n'a été trouvé.
_______________________________________________
Bug-prolog mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-prolog
|
_______________________________________________
Bug-prolog mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-prolog