Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!mips!wrdis01!gatech!udel!rochester!kodak!uupsi!sunic!news.funet.fi!jyu.fi!jyu.fi!suhonen From: suhonen@kunto.jyu.fi (Timo Suhonen) Newsgroups: comp.binaries.ibm.pc.d Subject: Re: Program that evaluates equations .. Message-ID: Date: 25 Apr 91 13:31:36 GMT References: <3235@mtecv2.mty.itesm.mx> <1991Apr25.114053.8398@uwasa.fi> Sender: news@jyu.fi (News articles) Organization: University of Jyvaskyla, Faculty of Sport and Health Sciences Lines: 36 In-Reply-To: ts@uwasa.fi's message of Thu, 25 Apr 91 11: 40:53 GMT Nntp-Posting-Host: kunto.jyu.fi josevela@mtecv2.mty.itesm.mx (Jose Angel Vela Avila) writes: > I'm looking for a program in Pascal or C, that read a equation from the > Keyboard and evaluate it ..... > If anybody knows some please tell me .... : About two years ago I wrote such a program. It reads a string and compiles it to dynamic list and evalutes that list (quite fast). You can set variables and use TP's build-in functions like sin, cos, ln etc. The idea is to first compile the string into dynamic list and then you can (fastly) calculate the list and give new values to variables and then again calculate... If my memory is not (badly) broken, the calculation time of the dynamic list is about 2 times longer than TP-compiled code... (it can easily be speeded up, if you need). Document?? Comments?? What are they?? Something to eat?? B-) If needed, I can put the code into garbo archive (and nic.funet.fi) for you. I won't post it because 1) I don't know how to post to bin-groups and 2) code is not too readable... If someone likes to post it later, then go on, I don't mind... I'll try to put the thing into garbo next monday, so Timo (nice name B-) can put it into a place it shoud be. I'm gonna re-write the whole thing with C++ next summer and add complex support (maybe also matrix support). If I get it working I'll surely post it! -- Timo "I am logged in, therefore I am" Suhonen suhonen@jyu.fi suhonen@euler.jyu.fi suhonen@kunto.jyu.fi suhonen@nic.funet.fi Opinions(?) are mine (if not stolen), NOT those of Univ. of Jyvaskyla.