bug-prolog
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: absolute value of min_integer a negative number?


From: Daniel Diaz
Subject: Re: absolute value of min_integer a negative number?
Date: Sun, 02 Nov 2008 10:40:12 +0100
User-agent: Thunderbird 2.0.0.17 (Windows/20080914)

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 address@hidden http://lists.gnu.org/mailman/listinfo/bug-prolog


reply via email to

[Prev in Thread] Current Thread [Next in Thread]