Board index » delphi » Equation Interpreter

Equation Interpreter

Is there a place where I can get some code that will intepret an equation and
then pass it into a function for use within the rest of the program.

Any help is greatly appreciated.

Please reply to my mail address as I cannot read the newsgroups too often.

James

 

Re:Equation Interpreter


In article <65c84d$9i0_...@leeds.ac.uk>,

Quote
J.A. Cruickshank <CSC6...@leeds.ac.uk> wrote:

:Is there a place where I can get some code that will intepret an equation and

If you mean paring an expression then you first might wish to take a
look at the FAQ, if you have not already done so:

 126643 Nov 14 1997 ftp://garbo.uwasa.fi/pc/link/tsfaqp.zip
 tsfaqp.zip Common Turbo Pascal Questions and Timo's answers

   All the best, Timo

....................................................................
Prof. Timo Salmi   Co-moderator of news:comp.archives.msdos.announce
Moderating at ftp:// & http://garbo.uwasa.fi/ archives 193.166.120.5
Department of Accounting and Business Finance  ; University of Vaasa
mailto:t...@uwasa.fi <http://www.uwasa.fi/~ts/>  ; FIN-65101,  Finland

Spam foiling in effect.  My email filter autoresponder will return a
required email password to users not yet in the privileges database.

Re:Equation Interpreter


Quote
J.A. Cruickshank wrote:

> Is there a place where I can get some code that will intepret an equation and
> then pass it into a function for use within the rest of the program.

> Any help is greatly appreciated.

> Please reply to my mail address as I cannot read the newsgroups too often.

> James

I am studying a double A-Level in maths. In a book I read that this is
one of the few things a computer can't do.

I mean 24X+X=Y is the same as 25X=y is the same as
50X=2Y is the same as 2(5X+5X+2)-4+5X=y infact, it has been
proven by some great mathmatichan that there are infinite
rearragments. He also proved that it was impossible to create
an algrothym to do it.

Re:Equation Interpreter


In article <65c84d$9i0_...@leeds.ac.uk>, "J.A. Cruickshank"
<CSC6...@leeds.ac.uk> writes

Quote
>Is there a place where I can get some code that will intepret an equation and
>then pass it into a function for use within the rest of the program.

>Any help is greatly appreciated.

>Please reply to my mail address as I cannot read the newsgroups too often.

If you are looking for a parser for something like 2*3+56*10-8 then have
a look at http://www.pedt.demon.co.uk/ and the Usenet link for Pascal
Caluclator Unit.
--
Pedt Scragg <postmas...@pedt.demon.co.uk>

In principle,   is there uncertainty that
Heisenberg was working his best in chaos?

Re:Equation Interpreter


Quote
On Wed, 26 Nov 1997, Robert Metcalf wrote:
> J.A. Cruickshank wrote:

> > Is there a place where I can get some code that will intepret an equation and
> > then pass it into a function for use within the rest of the program.

> > Any help is greatly appreciated.

> > Please reply to my mail address as I cannot read the newsgroups too often.

> > James
> I am studying a double A-Level in maths. In a book I read that this is
> one of the few things a computer can't do.

> I mean 24X+X=Y is the same as 25X=y is the same as
> 50X=2Y is the same as 2(5X+5X+2)-4+5X=y infact, it has been
> proven by some great mathmatichan that there are infinite
> rearragments. He also proved that it was impossible to create
> an algrothym to do it.

I too studied double A-Level maths... It is virtually impossible to write
an algorithm to prove that two dissimmilar formulae are equivalent for
all cases.

However, what I think the original poster wanted was some tools to create
a parser to interpret the formula into a computer usuable function. To
this end, there is a Pascal version of LEX and YACC available which would
enable the creation of a Pascal parser. If I remember correctly, it comes
with some sample code/grammers which would parse simple arithmatic and
write the result to the screen.

Unfortunately, I cannot remember the name of the file... I think it is
TPLY???.ZIP (or something like that).

Regards,
        Antony.

ssu95...@reading.ac.uk
 Author of PowerMOD/2

... There are four kinds of lies:
...   There are lies,
...     Damned lies...
...
...  And party political broadcasts.

[END]

Other Threads