From mc@uga.edu Mon Dec  3 19:35:35 2001
Received: from malibu.cc.uga.edu (malibu.cc.uga.edu [128.192.1.103])
	by swi.psy.uva.nl (8.10.2+Sun/8.11.2) with ESMTP id fB3IZZk11979
	for <prolog@swi.psy.uva.nl>; Mon, 3 Dec 2001 19:35:35 +0100 (MET)
Received: from archa8.cc.uga.edu (arch8.cc.uga.edu) by malibu.cc.uga.edu (LSMTP for Windows NT v1.1b) with SMTP id <0.005580D0@malibu.cc.uga.edu>; Mon, 3 Dec 2001 13:35:33 -0500
Received: from MINERVA (dsl-64-128-248-185.telocity.com [64.128.248.185])
	by archa8.cc.uga.edu (8.9.1/8.9.1) with ESMTP id NAA256088
	for <prolog@swi.psy.uva.nl>; Mon, 3 Dec 2001 13:35:18 -0500
Message-ID: <006001c17c29$41993eb0$c901a8c0@MINERVA>
Reply-To: "Michael A. Covington" <mc@arches.uga.edu>
From: "Michael A. Covington" <mc@arches.uga.edu>
To: <prolog@swi.swi.psy.uva.nl>
Subject: Re: [SWIPL] help with min please
Date: Mon, 3 Dec 2001 13:35:16 -0500
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000



> > > How can i use the min/2?
> > >
> > > min(+Expr1, +Expr2)
> > >     ...
>
> I haven't seen anyone really answer this question yet, so here goes.
>
> Crucially, min/2 is not a predicate.  It is an evaluable functor,
i.e.,
> it is used in arithmetic expressions just like sin(...), log(...),
> abs(...), and the like.  And min/2 itself has to be on the right-hand
> side of 'is' or in some other context where expressions are evaluated.
> Thus:
>
> ?- X is min(2,3).
>
> X=2
>
> ?- X=4, Y is min(X*2,X+2).
>
> Y=6
>
>
>
> Michael A. Covington - Artificial Intelligence Ctr
> The University of Georgia - Athens, GA 30602-7415 USA
> http://www.CovingtonInnovations.com  http://www.ai.uga.edu/~mc <><
>

