users-prolog
[Top][All Lists]
Advanced

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

Re: Iteratively calling Prolog from C


From: Daniel Dudley
Subject: Re: Iteratively calling Prolog from C
Date: Thu, 17 Jul 2003 16:31:10 +0200

Daniel Dudley wrote:
> Daniele Peri wrote:
> > 
> > You have a very simple way to get rid of your doubts: try
> > it yourself. In general, this helps a lot.
> 
> I sure would if someone would provide me with a binary
> version for Windows 2000. I don't have the time to compile
> the sources myself. :-(

I forgot that this is now provided in the download.

Using the top-level, I consulted factorial_nd.pl and then
ran the query:

    | ?- factorial(14,F).
    F = 205203456
    yes

Clearly an error will occur if N (the first argument) is
big. This is because, AFAIK, gprolog doesn't have a big
number library. Indeed,

    | ?- factorial(15,F).
    F = -143173632
    yes

Daniel




reply via email to

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