mathematical function parser/compiler

Jens Dreger <jens.dreger@physik.fu-berlin.de>
4 May 1998 23:07:49 -0400

          From comp.compilers

Related articles
mathematical function parser/compiler jens.dreger@physik.fu-berlin.de (Jens Dreger) (1998-05-04)
Re: mathematical function parser/compiler bernecky@acm.org (Robert Bernecky) (1998-05-07)
Re: mathematical function parser/compiler f81@ix.urz.uni-heidelberg.de (Joerg Schoen) (1998-05-07)
Re: mathematical function parser/compiler ramb@synopsys.com (Ram Bhamidipaty) (1998-05-12)
| List of all articles for this month |
From: Jens Dreger <jens.dreger@physik.fu-berlin.de>
Newsgroups: comp.compilers
Date: 4 May 1998 23:07:49 -0400
Organization: Freie Universitaet Berlin
Keywords: arithmetic, question

Hi !


I'm looking for a c/c++ function, that takes some string like


  f(x)=1/(1+x^2)


at runtime (!) and returns a function that evaluates this
expression when called within the program. This sounds like a
common problem, so I assume it has already been solved, but I
couldn't find anything like that.


Also, can you recommend any books that could help me here ?


Thanx a lot !


Jens
[That's close to the basic calculator example found in every introductory
compiler text, except that it needs to produce an intermediate form of
the function. If you want it to compile all the way to machine code at
runtime, that's not very commonly done, although not usually all that
hard to do. -John]




--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.