Delphi Math Functions

Parsers, Mathematical Expression Evaluators, Calculators

Numerical Methods in Pascal page:  Expression Parsers

Recursion Excursion:  Building an Advanced Expression Calculator article in Delphi Informant (subscription)

Package/Program Description
AdCalc Advanced Calculator evaluator which can be used to evaluate mathematical expressions  at run time. There is no restriction in depth or complexity of   expression.
CalcExpress See the Delphi Studio Companion CD#1 
CalcStr One of the HyperString functions
Calculators Non-Delphi:

The Calculator Home Page 

CHD3 An expression calculator to a compiler generator
DiffExpress TDiffExpress is a differentiator providing an easy way to use symbolic differentiation of mathematical expressions in your applications. It provides the result as an equation, supporting 5 operators, parenthesis, 18 mathematical functions and user-defined variables. 
 Freeware Scientific Calculator with Infix Notation, Brackets, Scientific Functions, Memory, Result History List and more. And it includes Delphi™ 4 Source for those interested.
Also requires:  LMD Tools 4

ESB Consultancy:

Express Expression evaluator for functions of up to three variables, also supporting up to 6 parameters.  Not an interpreter, but a quasi compiler for the functions, so it is fast for repeated evaluations.   Free for noncommercial and educational use.  By Renate Schaaf.
Expression Eddie Churchill's (Borland) Expression Evaluator
Expression Evaluator Evaluate mathematical expressions, including the following operators and functions: +, -, *, /, ^, ( ), mod, abs, atan, cos, exp, ln, round, sin, sqrt, sqr, trunc. Includes full source code and demo application.

Expression Evaluator V1.4 from BitSoft Developemnt, LLC (click on "Free Stuff")

Financial Calculator
Formula Compiler Component

Formula Compiler:  A Snappy Run-Time Formula Evaluation PackageDelphi Informant, June 1998, pp. 62-68.  (subscription)

FPlot Visual component that plots math functions. Includes a quick parser, so formulas are put as strings in a component's property.  Very simple to use.   Full source code.
Fractions Calculator An object-oriented fractions calculator 
Links Several math parsers/expression evaluators
LongCalc RPN expression evaluation with vast integers
Mathematical Expression Parser  MEP calculates expressions entered at runtime. User functions and variables can be used. 
Mathematischer Parser Turbo-Pascal-Units für Turbo Pascal 6 and 7, Beispiel-Programme und eine ausführliche Dokumentation.
MEP Mathematical Expression Parser (MEP). Calculates expressions entered at runtime as a string. 
MicroCalc TP 3
MWPasPar A Pascal parser
Delphi Super Page:
nrwcalc Component to manipulate the execution of the standard Windows calculator (calc.exe).
Parser10 Parse and evaluate mathematical expression
Delphi Super Page:
RecuCalc A TP parser, calculates math formula with recursion
RyFormulaEval Mathematical formula compiler & evaluator.  VCL Component for Delphi. TRyFormulaEval is a native Delphi component designed to evaluate mathematical formulas. 
SimpleCalc A simple 4 function calculator program 
SWAG (Parsing) Parsing/Tokenizing SWAG Software Archive Group, 14 examples    (requires Reader)
Symbolic Set of classes that can evaluate functions, and do simple symbolic operations (like deriving, Taylor etc).  Symbolic is not only a parser, it also does some symbolic math, and evaluates expressions fast.

Requires FCL (Free Component Library) available from 

Real and complex numeric expression evaluator  and TatEquationMemo and TatDBEquationMemo, to edit equations.  Works with real and complex numbers.  Works with multiple dependant equations. 
TbcParser TbcParser implements parse once-evaluate many times type of parsing for mathematical expressions given as strings. TbcParser is especially useful in scientific, engineering programs. 
TCalc "Classic" Turbo Calc example program

Download Turbo Pascal 5.5 from the Borland Community Museum: and unpack the TCALC.ARC file.

TExpress Expression Evaluator for functions of up to 3 variables, with support of 6 parameters. Not an interpreter but a quasi compiler, so evaluates fast.
TExpressionParser A flexible and fast expression parser object for logical and mathematical functions. 
TFormulaTrans Parses a mathematical formula; outputs the string in a form where it can be read by most of
the expression Parsers which are available

TFunctionParser and TComplexParser Delphi components for evaluating mathematical functions. TFunctionParser provides almost 90 predefined mathematical functions and operations, including arithmetic, powers, roots, logarithms, trig functions, arc functions, hyperbolic functions, statistical functions, random numbers, bessel functions, integral functions, gamma function, step function, bitwise and logic functions. TComplexParser provides more than 30 complex math functions and operations. 
by Marianne H. Goeltl-Schuberth

TmlRegularExpression Native Delphi Regular Expression handling
TRxMathParser Part of RxLib (VCL Extensions).  Functions: Sin, Cos, Tan, Abs, Exp, Ln, Log, Sqrt, Sqr, Int, Frac, Trunc, Round, ArcSin, ArcCos, ArtTan, Sign, Not   (file Parsing.PAS)

UCalc UCalc Fast Math Parser is an ActiveX component that allows a program to evaluate algebraic expressions at runtime. 

xaeval Simple evaluation engine, with support for variable substitution, capable to resolving BEDMAS and logic equations (source code  included).

Links Verified 12 Nov 2000
Updated 27 Nov 2002

since 1 Nov 1998