Runtime Expression Parsing:
I have compared and evaluated these parsers. Here
are the results.
EquationEvaluator - plugin - carbon and ppc
I have a plugin that works with RB 2.1 - 4.5 (ppc and carbon, not tested
with RB 5)
This one takes just one line, something like "x=5; 3*x" and
returns the answer as a double: 15.0. I have found this handy in the cgi
that I wrote. I think it is a good choice if you only want an answer for
one equation done once (in other words, it works great in a cgi, but it
is slow if you want to plot an equation - each time you send the equation
through the parser you lose time). More about it here
Expression Evaluator - class
Created by Steve LoBosso: http://members.tripod.com/~slobasso/.
This is written all in RB code, so it is probably slower than a comparable
plug-in (like the Equation Compiler Plugin by Bob Delany, below). But,
since you can see the source code you can modify it yourself, adding functions
if you need to. Steve also has a set of classes that can be used to do
Equation Compiler Plugin - plugin - carbon, ppc, and
By Bob Delaney (who has lots
of other plug-ins, below). This one compiles your equation and then you can
access it as though it was a built in function. It comes with the source code
to his Newton's Method program.
Eval - class
EvilEval - plugin - ppc only
Adrian Platts has several things on his web
page - a couple of different plug-ins that allow runtime equation evaluation
(Eval and EvilEval), and also a couple of math plug-ins that speed up calculations
in RealBasic (ScreenMath and AfterMath). He also has a nifty function plotter,
which can be used to plot functions of the form z = x + y.
Naturally, this is the sort of thing that RBScript should be able to do.
Other Useful Math Plug-ins/Classes
A Fast Fourier Transform plug-in can be found at http://septmr.free.fr/
Complex number math
One of many things that Jon's RealBasic Classes do is Complex number math.
If you need this sort of thing then you might want to check it out. jons-realbasic-classes
are available on Info-Mac
Steve LoBosso: http://members.tripod.com/~slobasso/
(mentioned above) also has some classes to do matrix math.
More Matrix Math
Here are some other matrix
classes, along with good examples of how to use them. These come from
Rodney Dyer, who is no longer developing or supporting them. I've rescued
the classes and they are now on my ftp server
has lots of math software available (see Equation Compiler Plugin, above) -
MPCalc plugin, which is basically all the routines used in his RPN calculator.
Precision Plugin, which can handle numbers with 30,000 decimal digits with absolute
values of 1e-40000000 and 1e+40000000.
Faster Math Evaluation
By Adrian Platts,
creator of Eval and EvilEval (see above)
Return to Tamara's Homepage