[Top][All Lists]

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

Re: min and max in arithmetic ?

From: Jasper Taylor
Subject: Re: min and max in arithmetic ?
Date: Fri, 21 Jun 2002 13:36:18 +0100
User-agent: KMail/1.4.1

On Friday 21 Jun 2002 1:13 pm, Jean Michel LECONTE wrote:
> min(X,Y,X) :- X #=< Y.
> min(X,Y,Y) :- Y #=< Y.
> is working (with X and Y constrained variables), isnt it ?

I guess so, but I want it in the arithmetic evaluator so I can go, eg., 

        RealSize is min( max( LIC, Size ), 10 ).

to get the equivalent of 

max(Size, LIC, Size1),
min(Size1, 10, RealSize).

Ie. implement min and max in the same way that, eg., trig functions are 
implemented (as in Sicstus) -- this is what I tried (and failed) to do


reply via email to

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