Re: help

From: Joachim Schimpf <j.schimpf_at_icparc.ic.ac.uk>
Date: Wed 16 Jul 2003 10:05:31 AM GMT
Message-ID: <3F15236B.100A1E0D@icparc.ic.ac.uk>
"Tuan C. Le" wrote:
> 
> Hello,
> 
> I'm learning Eclipse & got very interested in it.
> 
> I heard that Eclipse can solve polynomial inequations of the form:
>         a_n*x^n + a_{n-1}*x^{n-1} + ... + a_1*x >= a
> (where a's are constants & x is a variable neded to solve for (a's & x are
> rational)). For example: 3.5*x^2 + 2*x >= 3.
> 
> Could you pls tell me whether Eclipse can solve this kind of inequation and
> pls hint me how.

Yes it can:

?- lib(ic).	% load interval constraint library
Yes (0.92s cpu)

?- 3.5 * X ^ 2 + 2 * X $>= 3, X $>= 0, squash([X], 0.001, log).
X = X{0.68306261717484729 .. 1.0Inf}
There are 3 delayed goals.
Yes (0.01s cpu)

?- 3.5 * X ^ 2 + 2 * X $>= 3, X $=< 0, squash([X], 0.001, log).
X = X{-1.0Inf .. -1.2546185623569135}
There are 3 delayed goals.
Yes (0.01s cpu)

See the Constraint Library Manual, chapter on IC.


-- 
 Joachim Schimpf              /             phone: +44 20 7594 8187
 IC-Parc                     /      mailto:J.Schimpf@imperial.ac.uk
 Imperial College London    /    http://www.icparc.ic.ac.uk/eclipse
Received on Wed Jul 16 11:05:32 2003

This archive was generated by hypermail 2.1.8 : Wed 16 Nov 2005 06:08:24 PM GMT GMT