[PPL-devel] [Xsb-development] Arithmetic evaluation bug in the CVS HEAD version of XSB

Terrance Swift tswift at cs.sunysb.edu
Mon Sep 24 14:38:03 CEST 2007


This particular problem is less striking on 64-bits.

We do have a problem with floats on 64 bits, in that our only floats are
tagged.  This means that floats on 64-bit platforms are 61-bits, while
floats on 32-bit platforms are 64 bits.  So this is something that needs
to stay on our list to do.

Terry

On Mon, 24 Sep 2007 paul at duologues.net wrote:

> 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