Re: Mathematical frameworks

"Norbert E. Fuchs" <[email protected]>
Newsgroups gmane.comp.ai.prolog.swi
Message-ID <[email protected]>
On 6 Oct 2013, at 23:37 , Norbert E. Fuchs <[email protected]> wrote:

> I am about to finish the implementation of the arithmetic component of my reasoner RACE for Attempto Controlled English (http://attempto.ifi.uzh.ch/site/resources/).
> 
> Since RACE is implemented in SWI Prolog it was natural to choose SWI's constraint logic library CLPQR to implement the actual arithmetic operations. So far, this works quite nicely.
> 
> However, CLPQR has limitations for non-linear constraints. For example, the non-linear constraint x^2 -3*x + 2 = 0 can only be solved when a value for x is given, meaning that RACE currently cannot solve quadratic or any other non-linear equations. Thus, eventually I need to replace CLPQR by some other mathematical framework. 
> 
> Which mathematical framework would you suggest that offers more mathematical functionality than CLPQR and is easily accessible from SWI Prolog?


Following a hint by Jordi Saludes (UPC Barcelona), namely "transform the quadratic equation into a form that CLPQR can handle", I can solve quadratic equations in RACE. 

Concretely, I transform the quadratic equation 

X^2 + P*X + Q = 0

into its two solutions

X = -(P/2) + ((P/2)^2 - Q)^(1/2) and X = -(P/2) - ((P/2)^2 - Q)^(1/2)

that do not pose any problem for CLPQR. 

Note: This is not yet implemented.

Since linear and quadratic equations are used more often than other higher-order equations I think that currently I can live with CLPQR's limitations and do not need to look for a more powerful mathematical framework.

   --- nef
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.