[PPL-devel] [Xsb-development] Arithmetic evaluation bug in the CVS HEAD version of XSB
paul at duologues.net
paul at duologues.net
Mon Sep 24 14:00:25 CEST 2007
For most practical problems, this issue can be postponed for a very long time by going to the 64 bit version. Correct?
From: Bart Demoen <Bart.Demoen at cs.kuleuven.ac.be>
Date: 9/24/07 7:17Subject: Re: [Xsb-development] Arithmetic evaluation bug in the CVS HEAD version of XSB
> (Bart, do you have a practical example in which it was critical to
> have that one, rather special, negative integer? :-).
Of course, oodles of them :-)
I was just trying to cook up examples that give unexpected behaviour.
I had started from a predicate a/2:
a(X,Y) :- X < Y .
and did queries like ?- a(large_neg_int,large_pos_int), e.g:
| ?- a(-2147483647,3).
no
for instance.
What I later pasted in my mail was some sort of abbreviation of some
of the queries. I didn't even notice it was showing some different
weird behaviour. I now realize that toplevel queries of </2 can behave
differently from compiled goals. The problem with compiled </2 is that
XSB compiles X < Y to X-Y < 0 (or something like that - when there is
(undetected ?) overflow in the -/2, things go wrong.
Cheers
Bart Demoen
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Xsb-development mailing list
Xsb-development at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xsb-development
More information about the PPL-devel
mailing list