Advertisement

Equation Parser

Started by December 24, 2000 07:28 AM
1 comment, last by Fresh 24 years, 1 month ago
Does anybody know at all where I can get an equation parser, one that can handle things like brackets, and functions such as log and exp? How do these things work anyway, i.e. how do I use it in my code? Sorry but I have no clue r. "The mere thought hadn''t even begun to speculate about the slightest possibility of traversing the eternal wasteland that is my mind..."
Look on http://www.bebits.com/ there are a couple of equation parsers for BeOS with source included there
Advertisement
I wrote an expression evaluator about six years ago that is totally free to use in any way you want. You can get it from here:

ftp://ftp.islandnet.com/Mark_Morley/ee.zip

It's in C and is fully commented. It supports variables, function calls, constants, etc. You can feed it things like:

A = 10 * sin( PI )
B = A * sqrt( x * x + y * y )

and so on. The functions it knows about can be easily expanded upon.

Toom

Edited by - toom on December 24, 2000 2:40:36 PM

This topic is closed to new replies.

Advertisement