Last Modified January 16, 2005

Numerical Methods in Pascal: Code Downloads


Frameworks & Pascal Language Extensions

[o] EFLIB: An Extended Function Library by Johan Larsson
[o] Pascal-XSC

Computer Algebra Systems (CAS) and Expression Parsers

[o] MathWizard: a CAS in Pascal by Jonathan Luyckx
[o] Marco van de Voort's symbolic solver for Free Pascal & Delphi
[o] Symbolic differentiation using DiffExpress
[o] PAS Math: a CAS developed under GPL
[o] TCioinaEval: a fast and full-featured expression parser from Alexei Cioina
[o] Stefan Hoffmeister's Mathematical Expression Evaluator
[o] Vladimir Safin's Formula Compiler and other mathematical software for Delphi

Libraries & General Numerical Methods

[o] Jean Debord's Turbo Pascal Math Library
[o] Earl F. Glynn's Computer Lab
[o] Jean-Didier Gayrard's MathLib2 : a Turbo Pascal math functions library
[o] fsUltra : a pseudo-random number generator
[o] Mark Horridge's SparSolv Unit for sparse linear systems
[o] Lluis Olle's SparLin, a Delphi component for sparse linear systems
[o] The MtxVec Library from Dew Research
[o] David Butler's Delphi Fundamentals: mathematical routines and other goodies
[o] Delphi Mathematics Components from Hans Lohninger
[o] Numeric-Tools: a Delphi equation-solving component
[o] ChroMathSome for Delphi by John Merrit
[o] Coherent Cognition's MacMathPascal Library
[o] Jean-Pierre Moreau's Numerical Analysis website
[o] An operations research library from Seoul National University
[o] Marco van de Voort's numerical mathematics library for Free Pascal
[o] Han de Bruijn's Industrial and Applied Mathematics page
[o] Herbert Sauro's TLSODA for ordinary differential equations
[o] Antonio Gornia's Simultaneous Equation Solvers
[o] Volker Walter's Amoeba: A Nelder-Mead Solver
[o] Petr Mikulik's mathematical freeware (including a Levenberg-Marquardt routine)
[o] Michael Perdue's nonlinear regression code
[o] Source code for engineering students from Annibal Hetem, Jr.
[o] Ray Lischner's tools for floating point calculations in Delphi
[o] Dmitriy Anisimkov's Integer and Linear Programming (and FFTs and other goodies)
[o] Markus Weidenauer's LP-Optimizer
[o] Glenn Crouch's Delphi Math Unit and Scientific Calculator
[o] From ESB Consultancy, Alan Miller's Random Number Module
[o] ESB's Professional Computation Suite
[o] StatUnit from The Institute of Mathematical Statistics
[o] Applied statistics algorithms from StatLib
[o] Pascal code for computing a matrix of tetrachoric correlation coefficients
[o] Fred Edberg's Delphi Regression Components
[o] Delphi Statistics Components for Databases from Applied Analytical Systems
[o] Das Mathe-Programm der DPG
[o] The Stony Brook Algorithm Repository maintained by Steven S. Skiena
[o] A Scientific Subroutine Library for Turbo Pascal
[o] Rene Tschaggelar's Delphi mathematics solutions
[o] The EBK&NVS Pascal-Delphi Math Library
[o] Kjell Rilbe's complex number class for Delphi
[o] SWAG : the SourceWare Archival Group
[o] The Mathematics & Statistics section of Torry's Delphi Pages
[o] John Stockton's Borland Pascal Maths Page
[o] Ernie Deel's EFD Systems Tools
[o] Random numbers from the Mersenne Twister
[o] Bent Nielsen's Special Functions Library
[o] Robert Bullock's Delphi math units
[o] Franz Glaser's TP-Links
[o] Techniques of Scientific Computing from Monash University
[o] Delphi Tools for Physics at Davidson College
[o] UDDF: the Unofficial Delphi Developers FAQ
[o] Some Optimization Codes in the Public Domain
[o] The Home of the Hammster
[o] Bob Ferguson's Mathematical Freeware
[o] Harry J. Smith's Fun With Mathematics
[o] Andrew Williams' Mandlebrot Set project
[o] The Turbo Pascal Programmers' Page
[o] A Simulation Toolbox from Lin Jensen of Bishop's University
[o] William F. Polik's Turbo Pascal Procedures and Functions library
[o] Mark Myatts's statistical utilities
[o] Berend Tober's Delphi math routines
[o] A Random Number Test Suite from StreamSec.com
[o] Satya's collection of Numerical Methods in Pascal
[o] Crout's method in Delphi
[o] FitAll: nonlinear regression analysis from MTR Software
[o] The SysTools Library from Turbo Power Software
[o] Bill Miller's OpenStats2: an open-source statistical analysis package
[o] Fit Simplex, a curve-fitting program from Julien Bobroff
[o] Scientific Mathematics: using Exentia and byte-alignment for fasting floating point operations
[o] Vector mathematics in two and three dimensions
[o] A large collection of mathematical source code from the Pascal.Sources.Ru website
[o] Mathematical goodies from Borland's Code Central
[o] Mathematics units in the Free Pascal archives
[o] B-Spline code from NIST
[o] Delphi number-crunching components from Nils Haeck
[o] Numerical methods code from the University of Aarhus
[o] Arash Partow's FastGEO library for computational geometry
[o] [New!] GrMikeD's solutions to the traveling salesman problem

Large Integers

[o] [updated] Marcel Martin's Large Integer Library
[o] Walied Othman's FGInt: Fast Gigantic Integers
[o] A large integer arithmetic unit by Keith Briggs

Special Purpose Science & Engineering Codes

[o] Sergey Sadov's scientific software for scattering matrix calculations
[o] FDTD: Finite-Difference Time-Domain code for Delphi
[o] Eugeny Shybanov's large particle Mie-scattering code
[o] DSpatial: tools for the manipulation and visualization of satellite imagery
[o] The Matrix: mathematica physics coded in Delphi
[o] [New!] Michael Vinther's AEP analysis in EEG from schizophrenic patients using PCA
[o] A Schrödinger Equation Simulation by P. B. Visscher and D. L. Wewers
[o] Steam calculations from Gerard Koops & Bernhard Spang

Artificial Intelligence

[o] Digitial Filtering, Neural Networks, and Genetic Algorithms from BaseGroup Labs
[o] NEFCLASS-PC: A Neuro-Fuzzy Classification System
[o] Pieter Spronck's Elegance: genetic algorithms in Delphi
[o] An Introduction to Evolutionary Algorithms from Dan Taylor
[o] The Inference Engine Component Suite from RiverSoftAVG

Digital Signal Processing

[o] Robert Rossmair's Delphi interface unit for The Intel Signal Processing Library
[o] Don Cross's FFT code and tutorial
[o] John Herbster's generalized radix FFT code
[o] Andreas Hofer's Delphi FFT Unit
[o] Filip Jurcicek's Wavelets Studio for Delphi
[o] Eugen Tarasov's DSPLab for Delphi
[o] METEOR: FIR filter design from Steiglitz, Parks, and Kaiser
[o] Janez Makovsek's Basic Delphi Signal Processing Package (BDSPP)

 


Frameworks & Pascal Language Extensions

EFLIB: An Extended Function Library by Johan Larsson
EFLIB is an Object Pascal application framework with cross-platform support (primarily Linux, MS-DOS and UNIX), and is freely available for non-commercial use. EFLIB includes the following math routines:
EFLIB can be downloaded from the EFLIB Web Site. At the same site you'll also find complete documentation (on-line user's guide, class reference, FAQ, etc.)
Pascal-XSC
I'm not sure if this qualifies as a dialect of Pascal, or whether it's a whole new language whose immediate ancestor is ISO Standard Pascal. According to the description on the Pascal-XSC home page, it was developed specifically to supply a powerful tool for the numerical solution of scientific problems based upon a properly defined and implemented computer arithmetic in the usual spaces of numerical computation.

Please Note: ALL XSC software has been available FREE OF CHARGE since 1997. Don't be confused by pricelists etc. on some webpages which are related with XSC software: these webpages have not been updated by the responsible webmaster.

(Can someone can provide a more comprehensive review of this system?)

Computer Algebra Systems (CAS)

MathWizard: a CAS in Pascal by Jonathan Luyckx
MathWizard is a CAS(Computer Algebra System) written in Borland Pascal 7.0. The current release(V0.1) is an alpha version, and should be approached as a preview of what's to come, rather than a completely finished product. The current capabilities include:
The distribution package -- which can be downloaded here -- contains the complete source code, as well as the DOS-based executable. The program is being actively developed, and the author gladly accepts comments, suggestions, new ideas, etc.

An NMP News Update! Here's some good news for those of us interested in CAS development in Pascal. I've recently (April 25, 2000) received a brief note from Jonathan Luyckx updating me on the current state of MathWizard. Among other things, Jonathan says, "I have to say that I learned A LOT about computer algebra since I sent you the alpha version of MathWizard, and I now have a much cleaner view of the internals of a computer algebra program. It's clear to me that in order to create a solid algebra system, I have to rewrite the foundation of the program. In doing so, I also decided to develop this program in Delphi [...] the Mathwizard project is NOT discontinued [..] I only moved it to windows, and rebuilt it from the ground up."

Marco van de Voort's Expression Parser & Symbolic Solver
Marco van de Voort has put together a set of classes that can evaluate user-defined functions, and do "simple" symbolic operations (e.g., take derivatives, generate Taylor series, etc). While this is still a work in progress, Marco's initial release incorporates the following features...
Symbolic Expression Handling
  • Simple operators on expressions ( + / * - ^ )
  • Derivatives for simple functions (all operators + most functions in the Free Pascal math unit)
  • Taylor series
Primitives for Rearranging Expressions
  • Identifying of terms
  • Simple simplying (e.g., 2*2*x -> 4*x)
High Speed Evaluation (parse once, evaluate often principle)
  • Infinite variables
  • Infinite (symbolic) constants
  • Fast (hopefully!)
Cross-platform Development
  • Compiles under Free Pascal for multi-platform support
  • with a few simple (and obvious?) changes, will also compile under Delphi
Marco's code comes packaged with a nice bit of documentation (from which I extracted the feature list above). After you download a copy of Marco's symbolic library, read through the documentation, and check out the very impressive "To Do" list!

Symbolic differentiation using DiffExpress
DiffExpress provides symbolic differentiation of (simple?) mathematical expressions. It supports 5 different operators (+ - * / ^), parenthesis, 18 mathematical functions (sin, cos, sqrt, ln, etc), and an unlimited number of user-defined variables. DiffExpress is distributed freeware, and includes full source.

AidAim Software, the authors of DiffExpress, also distribute an expression evaluator called CalcExpress. Like DiffExpress, CalcExpress is freeware with full source.

PAS Math: a CAS developed under GPL
Michele Povigna and Carmelo Spiccia are the lead developers for PAS Math, a computer algebra system developed on-line in the it.comp.lang.pascal newsgroup. The latest version has experimental support for XML/MathML, and is an interpreter for the PAS Math Script Language. In addition to the transcendental and trigonometric functions supported by standard expression parsers, PAS Math also includes support for...
COMB(n,k) Calculates simple combinations
DERIV("function",x[,n]) Calculates the derivative of a function in x
INT("function",xi,xs[,n]) Calculates the definite integral of a function
MEAN(x1,x2, ... xn) Returns the arithmetic mean of the arguments
PERM(j1,j2, ... jn) Calculates permutations
VAL("function",x) Calculates the value of a function in x
Complete source code is available at Carmelo's PAS Math website and at Michele's PAS Math website

TCioinaEval: a fast and full-featured expression parser from Alexei Cioina
Alexei Cioina's TCioinaEval is a robust cross-platform mathematical expression evaluator for Delphi 6+ and Kylix 2+ that parses input strings at blazing speed (as much as 9 to 10 times faster than UCalc 2.0, according to numerous tests that Alexei has run) and offers top-notch calculating performance. TCioinaEval includes a huge library of built-in functions and will of course accept user defined functions and constants (a maximum 65535 for the latest version). In addition, TCioinaEval can provide symbolic differentiation of the functions it is asked to evaluate and (unique, in my experience) export its results in Mathematica 4.1 format.

To download the initial trial version of TCioinaEval, click here.

Neat New Updates: 15 March 2003

Not content to rest on his laurels (check out this unsolicited review from Ben Crain, author of Numerical (solutions) to Ordinary Differential Equations), Alexei has been extending the capabilities of TCioinaEval with a couple of powerful new units...

TDomainsEval

Alexei Cioina's Domains Builder utility is a software tool for engineers and applied mathematicians for meshing 2D domains. The engine that drives Domains Builder is Alexei's TDomainsEval. I must admit that I haven't messed with meshes in years, so I raided the DomainsEval read-me file for the following description...

A Domain is a closed set of planar points which satisfy a logical algebraic condition. A primitive (Atom) is the simplest domain. The following primitives have been defined in TDomainsEval:

  • Closed Ellipse with rotation angle;
  • Closed Rectangle with rotation angle; and
  • Closed Round Rectangle with rotation angle.
Five logical algebraic operations are defined on a domain
  • Union
  • Intersection
  • Compliment
  • Difference
  • Symmetrical Difference
TDomainsEval can parse and evaluate a composed domain built with primitives and operations. After parsing you can test planar points to determine if they are included in the domain or every part of the domain.

TCioinaMathLink

Another very useful unit from Alexei Cioina is TCioinaMathLink, which provides a seamless link to the Mathematica 4.1 kernel for symbolic calculation of derivatives, indefinite integrals...and anything and everything else you might want to get from the almighty Mathematica.

TParser by Stefan Hoffmeister
Stefan Hoffmeister's TParser is a Delphi component for parsing and evaluating mathematical expressions at runtime. According to the accompanying documentation, TParser's performance is remarkable - only 40-80% slower than similar compiled expression - and it is by far the fastest parser on the freeware market. TParser offers native support for the following operators and functions:
Operators Functions

addition (+) MIN, MAX
subtraction (-) COS, SIN, SINH, COSH, ARCTAN
multiplication (*) EXP, LN
division (/) SQRT, ABS
exponentiation (^) HEAV (heav(x) is =1 for x>0 and =0 for x < = 0)
DIV SIGN (sign(x) is 1 for x>1, 0 for x=0, -1 for x < 0)
MOD ZERO (zero(x) is 0 for x=0, 1 for x<>0)
PH (ph(x) = x - 2*pi*round(x/2/pi))
RND (RND(x) = x * Random)
(Adding your own functions is easy, too.)

TParser is freeware. It's available in both 16 and 32 bit versions from Econos Consulting Services, and the Delphi Super Page and its mirrors

Vlad's Delphi Page : Mathematical Software by Vladimir Safin
The Dimak & Vladimir Safin Delphi pages of a couple of useful mathematical tools. TFormulaCompiler is a runtime expression parser which the authors claim " evaluates results 1.5-3.0 times faster than hardcoded Delphi." The authors go on to describe TFormulaCompiler as a "real compiler, not an interpreter. After accepting valid arithmetic expression it generates machine code for evaluating given expression. [...] The code generated is very close to optimal. It uses almost 100% of math coprocessor resources." TFormulaCompiler is shareware, with full source available on registration.

Also available from the Dimak & Vladimir Safin Delphi pages is a matrix package which includes the TRealMatrix and TSparseMatrix components (yes, they descend directly from TComponent) and the TRealVector and TSparseVector components. The matrix stuff is freeware, with full source code written by Vladimir Safin.


Libraries & General Numerical Methods

The Turbo Pascal Math Library by Jean Debord
This is an excellent, actively maintained library compatible with a large number of DOS and Windows Pascal compilers. The description that follows is quoted from an earlier version of the TP Math homepage:

Welcome to TP Math, a mathematical library in Pascal for DOS, Windows and Linux. At this time, this library is compatible with:

This library is distributed as Freeware. You may use it anyway you like, as long as you don't charge money for it, remove the copyright notices, or hold anyone liable for its results.

This library provides routines and programs for :

Latest Updates: 30 August 2001

Latest Updates: 16 November 2002

The following programs are now availble on the TPMath web page:

The author has established a TP Math mailing list specifically to support his library. In my experience the response time is always excellent...

MathLib2 : a Turbo Pascal math functions library
This is a freeware collection of basic mathematical functions written by Jean-Didier Gayrard. Included are trigonometric, logarithmic and exponential functions, hyperbolic functions, and a complex numbers unit. Full source for all routines is included. The real treats here are the separate source files offering versions of the trig, log, exponential, and hyperbolic functions implemented in 387 assembler. You can find a copy at the Delphi Super Page in the Delphi 1.0 Freeware section. (Alternately, you can download a copy directly from this site.)

fsUltra : a pseudo-random number generator
review courtesy of Stefan Hoffmeister
There is a PRNG called FSULTRA that is available in quite a lot of languages, amongst them Turbo Pascal xxx (I am running it successfully with Delphi 1). It comes with a good import unit for TP and is written fully in assembler, making it extremely fast.
This is the Marsaglia PRNG, with code written by Zaman and Marsaglia of Florida State University. You can download a copy of fsUltra1.zip from this site.

The SPARSOLV Unit by Mark Horridge
Need to solve a large system of linear equations where most equations only mention a few of the variables? Then look at Mark Horridge's SPARSOLV unit. It solves linear systems with one RHS of size 100-5000 equations. The LHS matrix need not be symmetric and would typically have up to 10 non-zero entries per row. With source, for Borland dialects TP7.0 through to Delphi 3 and above.

Revised November 1999, with new example Windows program, and comparison to Luis Olle's SparLin Unit

Lluis Olle's SparLin Unit
Lluis Olle has ported NetLib's Sparse 1.3 package to Delphi's Object Pascal. The original SPARSE is written in C by Kenneth S. Kundert; according to Lluis, SparLin is
not an exact port of the original, but is 100% Delphi Object Pascal, with some added features not present in the original. [...] Currently I'm using the compoment for solving power flow problems of about 2000 buses (which implies a Jacobian of 4000x4000), and it takes a few seconds to solve a 10-15 iterations using Newton-Raphson.
SparLin elements are real numbers. Also available is the THsMatrix class, which is designed to hold sparse matrices of complex numbers. THsMatrix uses a hash function to access the elements quickly. A Delphi demonstration project is included with both the SparLin component and the THsMatrix class.
MtxVec: Object-oriented numerics from Dew Research
Dew Research is a joint venture between Janez Makovsek (the author of the Basic Delphi Signal Processing Package) and Marjan Slatinek. Together they have built MtxVec, a numerical analysis package for Delphi that includes "built in multithreading, intelligent object handling, CPU specific optimized code, designed for huge data sets, (and) complete vector/matrix arithmetic. The basic packages includes units for probability calculations, optimization, computation of special functions, and handling polynomials. Highlights from the MtxVec feature set include... Lots of other features (mostly to do with library architecture and interface issues) are listed at the MtxVec website. The latest version (V1.02) contains several updates, and now uses the latest version of the Intel Math Kernel Libraries (MKL 5.1).

UPDATE, 18 August 2001
Dew Research has just released Statistics V1.0, a new add-on package for their object-oriented numerical library MtxVec. The Statistics Package enhances MtxVec with these new capabilities: As with the MtxVec library, the complete Pascal source for the Statistics Package is available for purchase from Dew Research. (Because MtxVec makes use of several of Intel's numerical libraries, not all of the MtxVec source code is written in Pascal; see the note at the bottom of the MtxVec order page.)

For those of you who only need a limited set of the features offered by the Statisctics Package, Dew Research also offers what they call a "Probabilites Package", which includes "a replacement for Delphi's Math unit and a set of 19 different probabilities functions". .DCU files are available as freeware for Kylix and for Delphi 4, 5, & 6, and the full source can be purchased

UPDATE, 4 July 2002
The guys at Dew Research have been hard at work improving and augmenting their flagship product. The result is MtxVec Version 1.5, which is now available for a test drive at their web site. In addtion to lots of optimizations to the existing code, this new version adds (according to Janez Makovsek) "an extensive sparse matrix library and a function evalutor capable of parsing complex numbers". To check out the complete list of enhancements, pay a visit to the Changes MtxVec 1.5 web page...

UPDATE, 23 February 2003
Dew Research keeps adding more and more functionality of its flagship product MtxVec. Their lastest add-on is a digital signal processing package. In addition to a variety of different transforms (e.g., Z, Laplace, Hilbert) the the DSP library include For those who like to try before they buy, a trial version of the MtxVec DSP add-on is available for download. And if you want an overview before taking the download plunge (the trial version is a whopping 14.2 Mb), Dew Research makes the help file available either in an online version or via download for off-line browsing.

Delphi Components from Hans Lohninger
Hans Lohninger offers the following shareware units/components through his web pages
Borland Pascal programmers will find similar offerings here

David Butler's Delphi Fundamentals
David Butler has put together a comprehensive collection of routines to allow Delphi programmers to work at a higher level of development. His Delphi Fundamentals library contains units for string manipulation, dealing with internet stuff (i.e., the implementation of various RFC standards), handling dates and times...and of course a maths unit. The maths unit is the biggest of the bunch, and addresses a wide range of topics. In it you will find classes and functions for...

Numeric-Tools: A Delphi Component
Yudi Wibisono and Masayu Leylia Khodra have written Numeric-Tools, a Delphi Component for the numerical solution of mathematical problems. and procedures that can complement those available with Delphi. The authors advertise the following capabilities for their tool: An evaluation version is available from the Numeric-Tools website. Complete source is provided upon registration.

ChroMathsome for Delphi
This large collection of numerical routines is available as shareware from John Merrit. The author's ChroMathsome.txt file includes the following description :

ChroMathsome is a collections of units (this is NOT a component!) that have implementations for advanced mathematical functions and procedures that can complement those available with Delphi.

Implemented functions include:
There are more than 300 functions implemented in ChroMathsome...

An updated description of ChroMathsome (as of 7 February 1998) can be seen here

Evaluation versions of several ChromMathsome units -- binary logic, calculus, linear algebra, and statistics -- can be found at Torry's Delphi Pages in the Science sections. Complete source is available upon registration.

Jean-Pierre Moreau's Numerical Analysis website
The Pascal section of Jean-Pierre Moreau's multi-language numerical analysis website offers a very large selection of algorithms coded in Turbo Pascal for Windows. A slightly abbreviated table of contents shows these sections... As you can see, this is a very comprehensive list of basic (and not so basic) algorithms, one that includes a few things that are relatively rare. Each algorithm is presented in a separate webpage, so you can get exactly and only those things you want. (This is great if you only need a few routines...but perhaps not so great if you want to download the entire collection.)

Seoul National University's Operations Research Library
The Department of Industrial Engineering at Seoul National University has put together a very comprehensive online operations research lab. The library offers source code solutions (in Pascal, C, Basic, Fortran, and Java) that can solve most models of Operations Research. Volume 1 contains codes for solving 28 of the more basic problems in operations research, including modules for Volume 2 contains an additional 28 routines that address more advanced problems, including

While there is definitely a mother-load of code here, the Pascal routines APPEAR as if they may be a direct translation from FORTRAN, somewhat similar to the Numerical Recipes freeware collection. The one module I looked at (nonlinear minimization) featured a very heavy dose of labels and "goto" statements.

If you're interested in more than just code, check out the selection of articles available for download at the ORLab Library.

Marco van de Voort's Numerical Mathematics Library
One of the driving forces behind the devlopment of Free Pascal is Marco van de Voort. Currently Marco is in the process of incorporating into Free Pascal a large numerical methods library originally written for Turbo Pascal by Kees van Ginneken, Wil Kortsmit and Loek van Reij of the Computational Centre of the Eindhoven University of Technology. This is a very comprehensive library, containing routines for... You can obtain a snapshot of the library code as of 2000.07.13 here. The latest version can be obtained from the Free Pascal website on the development page. The "collection smaller packages" in the Download Daily CVS Sources section contains not only the numerical methods code, but also other modules for dealing with regular expressions, OpenGL, and a whole host of other useful goodies...

Han de Bruijn's Industrial and Applied Mathematics site
Han de Bruijn offers a treasure trove of unique material at his Industrial and Applied Mathematics website. In addition to a lengthy and detailed "Series on Unified Numerical Approximations" (published previously in 1993-94 the sci.math.num-analysis newsgroup), the site offers Recently Han has expanded his offerings with some in-depth engineering calculations, such as... There are numerous other goodies too, including computer experiments in the fields of Statistics and Computational Geometry.

There's a genuine wealth of information and code (and opinion!) at this site; it's definitely worth a visit.


Herbert Sauro's TLSODA: an ODE solver for Delphi
TLSODA is a translation of the LSODA (Livermore Solver of Ordinary Differential Equations) stiff differential equation solver available as freeware from Herbert M. Sauro's Future Skill Software. According the the Future Skill website...

LSODA can dynamically switch integration method according to how stiff the problem is. The two methods employed include:

I've looked briefly through the source code, and found a couple of things to really like: (a) TLSODA is a genuine Delphi class, and (b) the code contains a hefty number of comments. What's more, the TLSODA download also contains a vector class and a reasonably full-featured matrix class that includes routines for LU decomposition, singular value decomposition, and matrix inversion.

Antonio Gorni's Scientific Freeware
Antonio Gornia, a researcher and engineer in a Brazilian integrated steelworks, offers the following Turbo Pascal programs for doing linear and nonlinear regression: The programs are provided as source code only, and require Turbo Pascal 5.0 or better to compile.

Volker Walter's Amoeba: A Nelder-Mead Solver
Volker Walter has translated the Nelder-Mead downhill simplex method (Nelder, Mead; 1965; Computer Journal; vol 7, pp 309-313) from the original FORTRAN into Pascal. His Amoeba package contains the complete source code for implementations in both Borland Pascal and Delphi.

Petr Mikulik's Mathematical Freeware
Petr Mikulik's Freeware Page contains numerical mathematics code in several different language. While most of the routines are written in C++, Petr's Pascal offerings include

Michael Perdue's Nonlinear Regression Routine
TurboNLR is a very well documented implementation of the Fletcher-Powell method, "translated directly from the FORTRAN program FMFP (Fletcher and Powell Unconstrained Search Technique), which is described on pp. 221-225 of System/360 Scientific Subroutine Package, H20-0205-3 (International Business Machines Corp.)" The source is written in Turbo Pascal 3.0 (or earlier???), but compiles cleanly in Delphi 4 and FPC 0.99.14 with very little modification.

Source code for Engineering Students from Annibal Hetem, Jr.
Annibal Hetem, Jr. provides the Turbo Pascal source code from the Numerical Calculations course taught to second year of engineering students at the Universidade Paulista in São Paulo, Brazil. Included are modules for

Free Delphi Software from Tempest Software
Ray Lischner publishes several routines of interest to anyone doing numerical work in Delphi. In particular you might check...
All of these are found in the Delphi Components section (where else?)

New!! Ray's latest book, Delphi In A Nutshell (O'Reilly, ISBN 1-56592-659-5) hit the bookstores in late March of 2000. The code that accompanies the book (which you can download for free) contains several sweet goodies for Delphi users, including a very useful FPU unit and a threaded Mandlebrot set demo.

Dmitriy Anisimkov's Integer and Linear Programming, FFTs, and more
Dmitriy Anisimkov offers solutions in Delphi and Borland Pascal 7.0 to several different problems. Available for download at his web site are modules dealing with linear and integer programming, arbitrary precision arithmetic, and fast Fourier transforms. Documentation in ASCII format is provided in Russian. (If some kind soul can provide a rough translation, I'd be grateful.)

Markus Weidenauer's LP-Optimizer
Markus Weidenauer offers the complete source to his LP-Optimizer (a revised Simplex procedure) written entirely in Pascal for DOS (BP7) and OS/2 (Virtual Pascal)

Glenn Crouch's Delphi Math Unit and Scientific Calculator
ESBMaths from Glenn Crouch at ESB Consultancy is a collection of integer and floating point routines for Delphi and Kylix. The Delphi Math unit is not required. The latest update (19 June 2001) supports Delphi versions through D6 and includes vector and matrix routines (D4 and above) and probability and statistical routines. Freeware, with full source AND and extensive help file included. (Note: see the 2002.09.22 ESB Update for more info)

The ESB Scientific Calculator (also Freeware) has Infix Notation, Brackets, Scientific Functions, Memory, Result History list, and more. It too includes Delphi 4 source.
ESB's Random Numbers Module for Delphi
Glenn Crouch and crew have announced yet another bit of freeware for the mathematically inclined Delphi programmer. The easiest way for me to describe it is to repeat the text of Glenn's e-mail announcement below...

ESB Consultancy is pleased to announce the Public Beta of AMRandom - a translation of Alan Miller's Random Module for FORTRAN-90 into Borland Delphi. This translation has been done with Dr Miller's approval and is being made FREELY available to all Delphi Developers, though we do ask the Alan Miller and ESB Consultancy be given due credit. The following Random Number Generators are included:
Normal (Gaussian) Gamma Chi-squared
Exponential Weibull Beta
Student's t Multivariate Normal Generalized inverse Gaussian
Binomial (2 different ones) Negative Binomial
von Mises Cauchy
Borland Delphi 4 and above required. And as of 8 October 2001, ESB also offers AMRandom for Kylix users (see AMRandom for Cross Platform Development v1.0)
 

Note: The initial release of AMRandom generated random deviates from the listed distributions by first calling Delphi's built-in random number generator. The updated version (beta 2) now has overloaded routines so that users of the library can pass in the uniform random number Generator of their choice. The default is still Delphi's built in generator, but wrapper code is included for using Ernie Deel's Mother Of All Pseudo-Random Number Generators instead.
An ESB Freeware Update: 22 September 2002
To get all of the functionality that Glenn includes in his ESBMaths and AMRandom units (and for that matter, his very useful ESBDates too) check out the FREE SUBSET of the ESB edit components in his mighty ESB Professional Computation Suite. This collection, which is distributed on the Delphi 7 Companion Tools CD, contains an excellent selection of components for numerical data entry, including integer edit controls, floating point edit controls, and scientific edit controls. And of course you also get updated versions of all of the mathematical routines previously included in ESB's freeware offerings. Typical of ESP products, the complete source code is included, as is help in HTML format. For those of you without the D7 Companion Tools CD, Glenn has graciously uploaded versions for both Delphi and Kylix to Borland's Code Central repository.

ESB's Professional Computation Suite
In late August of 2001 ESB Consultancy released Version 2.0 of their Professional Computation Suite. This is an enormous collection of more than 100 units containing over 6000 routines/methods and over 150 classes and components for Borland Delphi 4, 5, 6, and 7. ESB's comprehensive set of numerical routines includes...

I wrote Glenn to ask him about the enhanced mathematical capabilities in ESBPCS V2. He replied that...
From the Math point of view, the biggest thing would be the Data Aware side of things - we now have...
  • Data Aware Hypothesis Analysis for the Mean and for the Variance,
  • Data Aware Linear Regression, and
  • Statistical Routines that work on a Data Source (i.e. no components besides the data source involved).
If (like me) you're not a database aficionado, there's still lots to like in ESBPCS V2...because now ESB is offering a "Lite" version which DOES NOT contain the data aware stuff, and DOES come at a substantially reduced price. Both the Standard and Lite versions of the ESBPCS package include a huge variety of custom designed Edit Controls for various numerical and mathematical data types. In addition to the customary assortment of numeric editors for floating point and integer values, you'll also find visual vector and matrix editors, and a complex number editor. The ESBPCS package is distributed as shareware and includes full source upon registration (about 3.5 Mb, not including the demo programs).

One other really nice thing about these components...the guys and girls at ESB Consultancy are constantly working to improve their product, and updates for registered users are a regular event. As of 22 September 2002, the current version of ESBPCS is version 2.3, released on 14 September 2002.


An ESB Update: 16 January 2005
As I noted/predicted above, over the last couple of years Glenn Crouch and his ESB Consultancy colleagues have continued to improve and expand their flagship product, the powerful and comprehensive ESB Professional Computation Suite (ESBPCS). ESBPCS for VCL Version 4.0.0, released on 16 December 2004, now contains over 6000 routines/methods and over 235 classes/components in over 140 units for Borland Delphi 5, 6, 7 and 2005/Win32. Obviously this is a really BIG product...and because ESB recognizes that there could be a number of folks who only want or need bits and pieces of the ESBPCS, the latest redesign of the ESBPCS unit structure makes it possible for ESB to satisfy those folks by distributing the following dedicated subsets: Finally, for those of you who (like me! ;^D) never ever use data-aware components, ESB also offers the compact and complete For details on what's included in the individual packages, scope out the feature matrix at ESB's website.

Earl F. Glynn's Computer Lab
The Computer Lab is a magnificent resource for Delphi programmers, with pages devoted to Mathematics, Graphics, Image Processing, Fractals & Chaos, and Science & Engineering. The Mathematics page contains links to numerous code collections, including several complex number libraries, and a Delphi Interface to Intel Math Kernel Library (DLL). The Graphics page includes 2D and 3D graphics code written in several dialects of Pascal (Delphi 1 and 3, and Turbo Pascal).

While most of the code at the Computer Lab is written specifically for Delphi, enough of it is sufficiently generic to be of use to programmers using other dialects of Pascal.

Prior to building his site(s), Earl made several of routines available here for download. The units listed below are still available at this site, although newer versions may be available at the ComputerLab

The ComplexOps Unit, a Turbo/Borland Pascal unit from Earl F. Glynn
The ComplexOps UNIT provides complex arithmetic and transcendental functions in Turbo Pascal, including complex trig (sin, cos, tan, csc, sec, cot), hyperbolic (cosh, sinh, tanh, sech, csch, coth), Bessel (I0, J0) and certain special functions (Log Gamma and Gamma). Complex values can be represented in either rectangular or polar form with conversions taking place as necessary (or on request). A "CDemo" program is included that shows how many of the complex functions can be used. The output from CDemo is also included.

ComplexOps may be freely distributed ONLY for non-commercial use. You can download a copy here

A 2D & 3D Graphics Library for Delphi 1.0
This is a pair of two units that provide a matrix library and a set of graphics primitives for displaying 2D and 3D graphics in Delphi 1.0 (not yet tested in 2.0). The math unit should be understandable by anyone with knowledge of matrix math and 2D/3D geometry. The Graphics Primitives unit allows the definition of 2D/3D vectors using real world coordinates (DOUBLE values). These coordinates can be transformed (scaled, rotated, translated) before display. To simplify display of 3D objects, a ViewTransformMatrix can be defined. Multiple viewports can be defined on a logical window. Clipping to each viewport is possible.

The Graphics Library may be freely distributed ONLY for non-commercial use. You can download a copy here


StatUnit, offered by The Institute of Mathematical Statistics
The Institute of Mathematical Statistics is affiliated with Faculty of Science, University of Copenhagen. The following description of the StatUnit package is a quote from their web page
StatUnit : This is a Turbo Pascal unit (that is a procedure library, roughly) for statistical computing. With this unit, Turbo or Borland Pascal can perform most of the tasks that are usually performed by standard statistical packages. At the same time, you maintain all the advantages of a down-to-the-ground programming language. If you are a pascal programmer, you will find it easy to write your own additional units for special purposes.

The StatUnit statistical analysis suite (and several other Pascal programs) can be found at chief author Tue Tjur's homepage

A Complex Numbers Class by Kjell Rilbe
Kjell Rilbe has written a complex numbers class for Delphi that he has recently made available to the wider Pascal community. Kjell's code comes with a very generous license:

Anyone can modify the code as they please, but I would appreciate if they send their changes to me (Kjell Rilbe) so that I can incorporate them if I think they're good. (With due credit of course!)

StatLib's Applied Statistics Algorithms
StatLib's collection of Applied Statistics Algorithms contains several items in Pascal.

Pascal code for computing tetrachoric correlation coefficients
Pascal code for computing tetrachoric correlation coefficients is available from Dirk Enzmann's Statistical Software page (look for TetCorr.zip)

Das Mathe-Programm der DPG
This page is written in German (but the available source code is in Delphi 2). Michael Beck has kindly provided a rough translation of the content of the main program modules...
Zinsrechnung Interest calculations
Kombinatorik Combinatorics: Permutations, Variations, Combinations
Wahrscheinlichkeit beim würfeln Probabilities in dice tossing
Zeichnen von beliebigen Funktionen Charting/Plotting of functions
Vektorrechnung Vector Operations
Berechnungen von/an geometrischen Figuren Area and Volume Calculations of geometric figures
kgV / ggT least common Multiple, greatest common Divisor
Mittelwerte (geom., harm., arhitm.) Calculations of averages - arithmetic, geometric, harmonic
Primzahlen Prime numbers
Bruchrechnung Fractions
Michael also recommends downloading the executable available at the Mathe-Programm site. Playing around with this should give you a better idea about the functionality of the various routines.

The Stony Brook Algorithm Repository, maintained by Steven S. Skiena
Quoting from the introduction...
This WWW page is intended to serve as a comprehensive collection of algorithm implementations for over seventy of the most fundamental problems in combinatorial algorithms.
In addition to Pascal code, there are links to versions written in C, C++, FORTRAN, Mathematica, and Lisp

You folks who are interested in this kind of stuff might also want to check out the on-line version of Steven Skiena's Algorithm Design Manual

Scientific Subroutine Library for Turbo Pascal
This is a math unit for Turbo Pascal, dating from the early 1980s. It offers matrix inversion, least squares fits, Romberg integration, and the evaluation of special functions (gamma, Bessel). In addition to the mathematics routines, several different sorting routines are also provided.

Delphi mathematics solutions from Rene Tschaggelar
Rene Tschaggelar offers well documented solutions to several common mathematical and graphical problems at his IBRT website. These include a linear equation solver, a least squares polynominal fit routine, and several tips on effective use of graphics in Delphi.

Also available from IBRT is a complex numbers unit. The code is written in Delphi, with complex numbers implemented as records.

The EBK & NVS Pascal-Delphi Math Library
The EBK&NVS Pascal-Delphi Math Library written by authors Nikolai V. Shokhirev and Eugene B. Krissinel contains units for real and complex calculations including Full source can be downloaded from the EBK&NVS website

Latest Updates: 27 October 2002
The latest and greatest release of the EBK&NVS Pascal-Delphi Math Library now contains some additional linear algebra routines. In particular, you'll now find Jacobi solvers for both real symmetric and complex Hermitian matrices, and Cholesky Decomposition.

Latest Updates: 30 May 2005
For a long time now, Nikolai Shokhirev has been using the algorithms from the classic book Computer Methods for Mathematical Computations by Forsythe, Malcolm and Moler in his PasMatLib library. Nikolai has now made the Pascal versions of the Forsythe, Malcolm and Moler algorithms available in a separate unit (uFMM). uFMM and all of the associated unit tests can be obtained from the PasMatLib download page

SWAG : The SourceWare Archival Group
This is a large collection of Pascal code fragments (mostly Borland) on almost every topic. The software runs under DOS & Windows. Freeware, available at (SimTel, Garbo, and elsewhere. At last count (swag9608) the math section had 116 entries, including FFTs (see especially Bob Shor's excellent and well-commented implementation), matrix algebra, complex numbers, etc.

Update, 2000.10.22
An updated SWAG code library is now available directly through a web interface. David Cermak at ProgNET CZ now has 134 different topics listed in the SWAG math section.

Update, 2000.11.12
The SWAG math listings are also available at Math section of Chuck Gadd's Knowledge Base

Torry's Delphi Pages
The Vector, Statistics, and "MathPacks" sections of Torry's Delphi Pages contain several useful items. In addition to numerous expression parsers, Torry also has

Latest Updates: 28 November 2002
Several new goodies have been uploaded to Torry's since the last time I checked. These include

John Stockton's Borland Pascal Maths Page
John Stockton's Borland Pascal Maths Page covers a broad range of topics of interest to folks writing numerical routines in Pascal. Code offerings include a large integers unit and high-speed trigonometric functions for BP7 and Delphi

Ernie Deel's EFD Systems Tools
Ernie Deel offers a useful collection of tools and advice at his EFD Systems Tools page, including...

Random numbers from the Mersenne Twister
Makoto Matsumoto's Mersenne Twister is a random number generator of period 2^(19937-1). The algorithm has been published in a refereed journal (M. Matsumoto and T. Nishimura, "Mersenne Twister: A 623-dimensionally equidistributed uniform pseudorandom number generator", ACM Trans. on Modeling and Computer Simulation Vol. 8, No. 1, Januray pp.3-30 1998), and implementations are available in a huge number of different languages. Pascal and/or Delphi versions have been put together by Roman Krejci, Paul Nichols, Andrew N. Driazgov, and others. But before you check out any of these implementations, pay heed to the warning posted on the Mersenne Twister homepage:
Caution: MT is for MonteCarlo, and is NOT SECURE for CRYPTOGRAPHY as it is.
Bent Nielsen's Special Functions Library
Bent Nielsen has put together a library of special functions, including Gamma functions and Bessel functions coded from Abramowitz and Stegun.
Robert Bullock's Page
Robert Bullock's homepage includes a complex number unit and a replacement for the Delphi math unit

Franz Glaser's TP-Links
The Numeric Programming & Math section of Franz Glaser's TP-Links page has links to several implementations of the Simplex method, some complex number units, a large integer unit, and more.

Techniques of Scientific Computing from Monash University
Leo Brewin of the Math Department at Monash University offers some Techniques of Scientific Computing. Included are Pascal listings for LU decomposition, Romberg integration, Neville's algorithm, and a few others. (if the link above is broken, try this one.)

Delphi Tools for Physics at Davidson College
Some interesting demonstrations of Delphi being used for scientific programming can be found at Davidson College's Student Projects in Physics. Among the projects available (complete code and/or .exe) are programs to simulate the motion of a planetary body, to model the rate equations of a two level laser, and to demonstrate graphically multiple slit interference using Huygens principle. Also available is a matrix unit that includes matrix inversion, LU decomposition, and a power method implementation to find the most dominant eigenvalue and its corresponding eigenvector

UDDF: the Unofficial Delphi Developers FAQ
The Unofficial Delphi Developers FAQ contains a few useful mathematical routines, including a well thought-out power function by Paul Cunningham, and an FFT and (small) complex numbers library by David Ullrich.

Some Optimization Codes in the Public Domain
Jiefeng Xu's List of Interesting Optimization Codes in Public Domain contains several Pascal listings

The Home of the Hammster
The Home of the Hammster offers "a full set of trigonometric and hyperbolic routines and for complex numbers too! Also some linear and logarithmic graphing as well as true perspective viewing of 3 dimensional wire-frames."

Bob Ferguson's Mathematical Freeware
From Bob Ferguson's Freeware WebSite you can download several different mathematical codes he's written in both Turbo/Borland Pascal and in Delphi. Included among the offerings are modules for factoring polynomials (up to degree 40), generating prime numbers, and solving linear systems using Gaussian elimination.

Harry J. Smith's Fun With Mathematics
Harry J. Smith's Fun With Mathematics has Pascal listings for the calculation of Gaussian Primes and big Fibonacci numbers (and maybe some other stuff too...)

Andrew Williams' Mandlebrot Set project
Computing the Mandelbrot Set: source code and explanation by Andrew Williams. (and for lots more chaotic code, check out the entries from Borland's Fractal Programming Contest)

The Turbo Pascal Programmers' Page
My earlier announcement of the imminent demise of Johan Prins' Turbo Pascal Programmers' Page fortunately proved unfounded. The last time I checked (June 30, 2001) it was alive and well and healthier than ever. Johan offers several implementations of the simplex method and of complex numbers, a link to a prime numbers unit, and lots and lots of other useful goodies for Turbo Pascal programmers.

Coherent Cognition's MacMathPascal Library
This library is contained in a Hypercard stack, and has long been available to MacIntosh programmers. Thanks to the herculean efforts of a pair of kind-hearted net-citizens, a zip file of the MacMathPascal code is now available (as shareware) for programmers on other platforms. This looks to be a fairly comprehensive library. There are routines included for matrix methods, FFTs, differentiation and the solution of differential equations, and for several different interpolation methods. You can read the author's introduction here.

Update: 29 November 2002
I recently received a short note from Dr. Tim Kaiser, the author of MacMathPascal, giving me a little history of his product and letting me know that, after an extended hiatus (from somewhere around 1990 until March of this year), Coherent Cognition is definitely back in action. One thing I found particularly encouraging in Tim's note was this quote:
I started Coherent Cognition a number of years ago with MacMathPascal as our only product. It partly paid my way through school the second time.
Nice to know that real money has been made selling numerical analysis code written in Pascal!!

Fred Edberg's Delphi Regression Components
Fred Edberg has developed RegComp, a multifunctional regression component for 32 bit Delphi programmers. The statistical functions included focus primarily on multivariate parametric and regression related tasks. A brief (but partial) list of RegComp's capabilities includes... You can download a test-drive version of RegComp from the statistics section of Torry's Delphi Pages

Update, August 15, 2000
There's some bad news in the numerical Pascal community, but it's mitigated by a bit of good news. The bad news is that Fred Edberg has (temporarily?) bailed out of the component writing business...so if you're searching for a fully supported, ready-to-go regression component, there's now one less vendor in the market. The good news is that Fred left a very sweet legacy behind: the complete source to his RegComp component is now available as freeware in three separate packages... Fred's source is provided "as is"; it comes with all the standard disclaimers firmly in place, and without any official support from the author (though maybe you could sneak in an occasional "short & concise" question). Personally I think this is a very classy move...rather than let a bunch of useful code get old and moldy on his disk drive, Fred has released it to the Pascal programming community "so that anyone that is looking to do any kind of statistics/regression programming can have the source to use as a guide." Thanks, Fred!

Delphi Statistical Components from Applied Analytical Systems
Applied Analytical Systems offers a couple of tools for database programmers using Delphi, including components for descriptive statistics and multiple regression. A quick trip to their web page suggests that these are for database programming only. Since I'm not a database person, I have no idea how useful these things might be, nor do I have any comprehension of how difficult it is to integrate other possible solutions that are not database-oriented. Anyone care to enlighten me?
A Simulation Toolbox from Lin Jensen
Lin Jensen, a lecturer in the Department of Computer Science at Bishop's University, has put together a set of simulation programming notes to introduce students to the contents of his Simulation Techniques course. In addition the course notes, he also offers a complete simulation toolbox which includes documentation, example programs, and a suite of Pascal units for building various types of simulations. Lin describes these units as follows... The toolbox download page lists several more units, as well as a selection of complete (classic?) simulation program examples. The code is written in Turbo Pascal 6.0.

William F. Polik's Turbo Pascal Procedures and Functions library
William F. Polik, a chemistry professor at Hope College in Holland, Michigan offers a wide range of free software for scientific uses. In addition to a web-based computational chemistry package and a Turbo Pascal Graphics Library (for DOS), Polik provides a Turbo Pascal Procedures and Functions library that contains a hefty dose of numerical analysis routines. Polik's library includes units for... The code looks fairly generic. I was able to compile the two curve fitting programs with both Borland Pascal 7 and Free Pascal 1.02, with no changes whatsoever required in the source code (well, I did have to change the paths for the include files.)

Mark Myatt's Statistical Utilities
Mark Myatt has collected several "Miscellaneous Statistical Utilities" written by Ray Simons. All of these programs come with documentation and Turbo Pascal source code.

Berend Tobers's Delphi Mathematics Routines
Berend Tober offers an interesting collection of Delphi components and classes for download from his web site. For the mathematically minded Delphi programmer he presents... (The component descriptions above were swiped shamelessly from Berend's website)

A Random Number Test Suite from StreamSec.com
StreamSec.com is a partnership between Henrick Hellstrom and Peder Finnsio devoted to developing a series of encryption products based an algorithm developed by Henrick. At their site you can download the source code for a test suite for pseudo random number generators developed according to NIST SP 800-22, and Delphi code for generating permutations and combinations

Update: 30 May 2005 On March 8, 2005 in the borland.public.delphi.thirdpartytools.general news group, Henrick Hellström responded to a question asking
> I'm looking for a Unit or just some Code to have larger (unsigned)
> Integers than a Int64. For the moment I have a Unit that provides a
> 128-Bit unsigned integer, anything else out there?
by saying "You might want to take a look at our MpArith units in StreamSec Tools 3.0 [...] If you want a full source version of our large integer code, you need at a minimum the StreamSec Public Key Cryptography Tools Cross grade package"

Satya's collection of Numerical Methods
At Satya's website you'll find a listing of (in his words) Programs in Pascal for Solving Various Kinds of Problems using Numerical Methods. Included are routines for root finding, solving linear systems, interpolation, and numerical differentiation and integration.

Crout's method in Delphi
Lucio Tavernini a Professor of Applicable Mathematics at the University of Texas at San Antonio distributes a set of numerical analysis notes from his website. Included among these is a discussion of the "many variants of LU or LDU factorization by Gauss elimination". Delphi code for two different versions of Crout's Method is also available for download.

FitAll: nonlinear regression analysis from MTR Software
MTR Software's FitAll is a data analysis tool specializing in nonlinear curve fitting (regression analysis). The Standard Edition uses a Levenberg-Marquardt algorithm to handle "more than 55 (nonlinear?) functions with over 200 variations." While the Standard Edition is a stand-alone Windows 3.x executable, the Research Edition includes all source code (written in Borland Pascal v7.0 / Delphi for Windows) and an "easy to follow Programmer's Guide as a printed manual and as on-line help that explains how to add functions of your own to FitAll."

SysTools from Turbo Power Software
Okay, as I write this the date is August 12, 2001, and for some unfathomable reason I've only just now noticed the robust array of mathematical goodies available in the SysTools package offered by Turbo Power Software. While the numerical stuff actually comprises only a small part of an enormously comprehensive package, SysTools does include... The Turbo Power guys have been around since the days of Turbo Pascal 6 (or maybe earlier?) Over the years I've owned and used several of their products (though not SysTools), and I've always been tremendously impressed with the quality of their code and their dedication to top-notch customer service. If they ever put out a scientific math library, I'll buy it immediately...

METEOR: FIR filter design from Steiglitz, Parks, and Kaiser
METEOR is constraint-based FIR [finite impulse response] filter design program written in plain vanilla Pascal. In the abstract to their article describing their work, the authors say that METEOR "use(s) the simplex algorithm for linear programming to find a best linear-phase FIR filter of minimum length, as well as to find the minimum feasible length itself. The simplex algorithm, while much slower than exchange algorithms, also allows us to incorporate more general kinds of constraints, such as concavity constraints (which can be used to achieve very flat magnitude characteristics)." You can download both the Pascal code and article (in postscript format, as published in IEEE Transactions on Signal Processing in August 1992) from the lead author's web site.

Bill Miller's OpenStats2: an open-source statistical analysis package
Bill Miller is a retired professor of Industrial Technology who is "entertaining himself" (his words, not mine) by building a freeware open-source statistical analysis program to benefit "numerous students who could not afford to purchase a commercial statistics package while they were learning statistics in their courses or were completing a research project". The initial version of OpenStat was written in Borland's C++ Builder. But with the advent of Kylix and the possibility of cross-platform performance, Bill has moved his latest efforts to Delphi 5.0.

The beta version of OpenStats2 is available from Bill's OpenStat Home Page. And in keeping with the Open Source idea, ALL of the code (both Pascal and C++ versions) is available as well.


Fit Simplex, a curve-fitting program from Julien Bobroff
Like the OpenStat programs described above, Fit Simplex is a complete data analysis application coded in Delphi. Fit Simplex's forte is curve-fitting using the simplex method. The author, Julien Bobroff, claims that the simplex method is "much more tolerant than usual least square method (slower in convergence but better to find the real minimum)."

As an aside I must admit that I'm not at all sure what he means by this...I've some run relatively extensive comparisons using the NIST statistical reference datasets for nonlinear least squares...I've compared the simplex methods in both MtxVec and the TPMath Library to several different implementations of Levenberg-Marquart and BFGS...and the simplex method just doesn't acquit itself well in these tests...)

Of course the "best" method very frequently depends on the exact problem you're attempting to solve...so it's really nice to have another full-fledged simplex implementation available. The source code for the Fit Simplex program is available for download at Julian's website.


Pieter Spronck's Elegance: genetic algorithms in Delphi
Pieter Spronck's Elegance is a software environment uses that genetic algorithms in the design of neurocontrollers that will generate the appropriate inputs so that a production plant will produce a desired set of outputs. At Pieter's website you can download ALL of the code for Elegance.

An Introduction to Evolutionary Algorithms from Dan Taylor
Dan Taylor of Logical Genetics offers a web-based tutorial on the design and use of evolutionary algorithms. The material in Dan's article was first presented at a meeting of the UK Borland User Group, and comes well recommended (via the borland.public.delphi.thirdparty-tools newsgroup) by Delphi guru Bob Swart. To demonstrate the power of genetic algorithms, Dan's tutorial derives a solution to the classic Travelling Salesman problem. Complete Delphi source code implementing Dan's solution is available from the Logical Genetics site.

The Inference Engine Component Suite from RiverSoftAVG
RiverSoftAVG advertises it's Inference Engine Component Suite (IECS) as a "powerful Delphi component suite for adding rule-based intelligence and fuzzy logic to your programs." While these components *appear* to be aimed primarily at gamers (that's the inference I draw from browsing the RiverSoftAVG site), I bet they'd make a sweet and useful addition to the software toolbox of those folks who do any kind of computerized pattern recognition or fully automated type classification.

The IECS sports some pretty impressive features. In addition to the "Rapid Application Development of Expert Systems Programs", these components offer "Database support through TDataSource and TDataSet components", and the TInferenceEngine component supports a subset of CLIPS, a rule-based expert system originally developed at NASA's Johnson Space Center. Perhaps most intriguing is the Expert System Wizard, which promises a "step-by-step guide to creating expert systems". (Ought to be worth looking into, eh?)

(Note: all the italicized text in the blurb above was swiped shamelessly from the RiverSoftAVG website on 28 November 2002)

Scientific Mathematics: using Exentia and byte-alignment for fasting floating point operations
'Single Instruction, Multiple Data' (SIMD) commands allow processors to handle several mathematical computations simultaneously. Chris Rorden's Scientific Mathematics page offers performance tips and a demo program (with complete code included) that shows how to take advantage of SIMD in your Delphi programs. (The speed increases are especially notable for Pentium-4 chips)

Chris's demo uses SIMD code provided by Stefano Tommesani's freeware Exentia library.


Vector math libraries in two and three dimensions
That I know of the existence and content of these libraries is a perfect example of the highly cooperative flow of information within the Pascal internet community. It started with yet another useful tip from long-time correspondent Michael Beck (a genuine JEDI master!), who pointed me to a 2D vector mathematics library. And while this is EXACTLY the kind of stuff I like to promote on these pages, the website text is written entirely in Russian and was therefore a complete cipher to me. However, almost immediately following a request I made in Borlands delphi.non-technical newsgroup, Andrew Rybenkov kindly provided a complete translation of the site contents, which I've reproduced below...
2D planar math Module PlanarMath deals with vectors, sections, lines, points, and polygons on a plane. It is intended for any cases when you need to find intersection of lines, is a point inside a polygon, distance from a point to line or line section, vectors rotation, etc. (e.g., for CAD programs, or games like WarHammer, when objects are defined by coordinates, and the field is not split to stand-alone cells.) PlanarMath was tested with D4 and D5.
3D volume math Module VolumeMath is expansion of PlanarMath for 3D cartesian space. It let you deal with 3D vectors, and parametric lines and planes, find distance from a point to line or plane, find equations of planes intersection, intersections of a line and a sphere, etc. To demonstrate its abilities I have wrote 3D scene viewer with ray-tracing.

Mathematical source code from the Pascal.Sources.Ru website
The curators of the Pascal.Sources.Ru website have collected a number of Pascal source codes dealing with a broad spectrum of mathematical topics, including units that address areas such as...
vector & matrix libraries large integer libraries
random number generators high precision calculation of pi
continuous and discrete simulations prime numbers
linear and nonlinear regression analysis complex numbers
Most of the items in this collection are fairly old -- some date back as far as 1985, and (apparently) only two were produced within the current century. But if you're at all interested in acquiring any of the "standard" numerical libraries for Pascal, Pascal.Sources.Ru looks like a good place to start looking. At their site you can find copies of the Numerical Recipes freeware code, Jeff Weiss's "updated" Turbo Pascal version of the code from Alan Miller's Pascal Programs For Scientists And Engineers, and (much to my surprise!) a copy of the code from Borland's venerable Numerical Methods Toolbox.

(Potential downloaders of the Numerical Methods Toolbox code should tread carefully, as it's not at all clear that this work has been released into the public domain or that it is being distributed with the full knowledge and permission of the copywrite holder. I've asked repeatedly, but no one at Borland can/will say with certainty who currently owns the copywrite to the Toolbox code. I keep hoping that one day we'll see it freely available in the Borland Community Museum ...but so far, no go... right now Pascal.Sources.Ru appears to be the only place on the web where you can download the Numerical Methods Toolbox code...)


Mathematics code from Borland's Code Central
In addition to database routines, various components, and other Delphi-type goodies, Borland International's Code Central also contains a smattering of math and science routines. The last time I checked (5 February 2002) these included... Checking briefly again on 16 January 2005, it looks like there are a couple of interesting new entries...

Mathematics units in the Free Pascal archives
Borland isn't the only compiler maker to offer a selection of mathematical goodies at its website...the Free Pascal website also offers a small selection of user contributed codes for mathematics and numerical analysis. As of May 6, 2002 these included...

Routeware's RW Net: a general purpose shortest path library
Routeware's RW Net is (according to chief architect Uffe Kousgaard) a general purpose shortest path development tool/component for Delphi 4 through 7 and Kylix 1 and 2 (also for C++ Builder 5 and 6, and available as a DLL and/or Active-X component as well). Underneath the hood RW Net is is a true non-visual component written in pure Delphi Pascal (no assembler anywhere). According to Routeware's UseNet product announcement, the RW Net feature set includes...

B-Spline code available from NIST
As I've said elsewhere within this webspace NIST, the USA's National Institute of Standards and Technology, provides a number of useful resources for numerical analysts and statisticians. Among the latest goodies that I've discovered there are the source code to a very complete B-splines implementation that is accompanied by some very thorough PDF documentation: Conversion Between Rational B-Spline and Parametric Spline Representations, by Richard Fuhr.

Delphi number-crunching components from Nils Haeck
Nils Haeck is the founder of SimDesign, a software design company that creates highly specialized software for the automotive and aeronautical industries. SimDesign does a large part of their development using Delphi, and in the process they've produced the following number-crunching components:

To get a good feel for the kinds of things that can be done with these components, check out the many applications developed by Nils's SimDesign company.

(PS: A tip of the hat and many thanks to Nils Haeck for the component descriptions in the list above!)

Update, 16 January 2005: in addition to the goodies above, Nils now distributes a free Delphi implementation (source included) for a complex Fast Fourier Transform (FFT) on an arbitrary length data series. You can snag your copy from Nils' FFT library web page.

Numerical methods from the University of Aarhus
When I first discovered the University of Aarhus site, I had no idea what was going on...I was pretty sure it related somehow to numerical methods, but the text was (and still is, AFAIK) in Danish, and unfortunately Danish is one of the millions of languages that I can not read. However, a quick query in the borland.public.delphi.non-technical elicited a lightning quick translation by Kim Madsen of Components4Developers. So if you find this info useful, and you're not a Danish speaker, thank Kim!

Essentially this site presents the syllabus for a course in numerical methods, with the expressed goal of being able to "solve larger numerical problems with as little CPU power as possible". The site provides access to three units written in Delphi 4:


Arash Partow's FastGEO library for computational geometry
Arash Partow offers an open source library of 2D and 3D computational geometry algorithms to programmers using Delphi 4+ and/or Free Pascal 1.9.x. Not being especially conversant with computation geometry stuff, I've opted to leave a description of Arash's library to the experts...so the following text was shamelessly swiped from the FastGEO website on the 6th of November, 2004:
FastGEO is a library that contains a wide range of highly optimized computational geometry algorithms and routines for many different types of geometrical operations such as geometrical primitives and predicates, hull construction, triangulation, clipping, rotations and projections.
(PS: Arash, my apologies for the VERY tardy notice of your work!)

Solutions to the traveling salesman problem from GrMikeD
If you surf over to GrMikeD's Homepage, sitting quietly in the "Other Stuff" section of his web site you will find TSP Solver, a freeware program for solving the Traveling Salesman Problem. When you download the TSP Solver zip file, you will find the Michael has included the complete Delphi 7 source code.

 


Large Integers

Marcel Martin's NX: Multiprecision Tools for Delphi
Marcel Martin's new NX library provides all the tools a Delphi programmer will need to "implement algorithms that require very big integers (or polynomials over GF(2))". The current NX package contains the source code for 15 different units, and is available as a free download (subject to a few restrictions required due to software patent disputes that have erupted between various countries on our fine but occasionally quarrelsome planet...)

Walied Othman's Fast Gigantic Integers
According to the author, Walied Othman, the size of the integers in his FGInt (Fast Gigantic Integers) package is limited only by the amount memory you have available. Full source code is available for both the Delphi and Free Pascal compilers.

A Large Integer Arithmetic Unit by Keith Briggs
Exploring Number Theory with the TI-85 and TI-92 By Paul Pollack contains a link to the source code for a Turbo Pascal 5 Unit by Keith Briggs. Pollack describes Briggs' unit as follows...
Implements large integer arithmetic and other common operations (gcf, storing of exact rationals, integer factoring using a method of Pollard, etc.) based on the algorithms presented in TAOCP (vol. 2, sec 4.3.1). Excellent.
WARNING! As of May 23, 1999, the links above appear to be broken. I don't know if this is a permanent condition, or merely temporary. For now (and maybe forever), you can download a copy of Keith Briggs' code here


Special Purpose Science & Engineering Codes

Sergey Sadov's Scientific Software
Sergey Sadov is an applied mathematician whose research specialties include nonlinear ordinary differential equations and the numerical solution of partial differential equations. His scientific software page offers some unique code for Pascal programmers... While not strictly numerical in nature, Sergey's site also offers another unique (at least in my experience) and potentially very useful library: check out his Object Pascal library for programatically creating PostScript pictures (and maybe TeX output too??)

FTDT: Finite-Difference Time-Domain code for Delphi
Paraphrasing slightly from a blurb at the ToyFTDT site...
The acronym FDTD stands for Finite-Difference Time-Domain. FDTD is a method for predicting and studying electromagnetic effects through computation, rather than analysis or experiment. The method uses a first-order finite-difference approximation of the differential form of Maxwell's equations to calculate the field intensity values at every point in space for every increment in time over a specified simulation range.
Included among the source code contributions at the ToyFTDT site is a version written in Delphi the simulates a point source in free space, with Mur absorbing boundaries.

Eugeny Shybanov's large particle Mie-scattering code
Eugeny Shybanov of the Department of Optics at the Marine Hydrophysical Institute in Crimea, Ukraine has published a Mie scattering code capable of retrieving scattering parameters for very large particles. According to the comments in the code, the shMie program "computes complex amplitudes and effectiveness factors for Mie scattering of light by spherical particles with size parameters up to 1,000,000,000." (wow!)

DSpatial: a library of tools for the use, manipulation, and visualization of satellite imagery and other spatial data
Quoting an announcement made Thursday, 27 November 2003 in the borland.public.delphi.thirdpartytools.general newsgroup
DSpatial 0.2.1 has just been released on SourceForge. DSpatial is an open-source project building a high performance, multi-threaded geospatial analysis and visualization toolkit in Delphi. The current version adds drivers for accessing data in ESRI FLT format, Idrisi rasters, and HDF. The rendering pipeline is optimized to reduce memory usage. Also included is a highly customizable histogram component, which can be used for other applications as well. Please visit http://dspatial.sourceforge.net/.
While I'm listed as a member of the DSpatial team, to date I've contributed nothing whatsoever (except for perhaps a bit of cheerleading :^D). But I've been using the DSpatial HDF unit, and I can promise you all: if you use Delphi and need to grapple with HDF files, this unit is an absolute godsend. So don't delay -- download it today!

Mathematical Physics: codes from "The Matrix"
The Matrix is a site (apparently in Russia) that offers a wealth of very neat code examples in various fields of mathematical physics. Among the chunky nuggets that you can download from the site are these (perhaps unique) routines...
Brownian.zip   Brownian motion modelling
Laplace.pas   Sample code solving Laplace equation
Motion.zip   Delphi project modelling charged particles motion
Random.pas   Sample code modelling random oscillations
Waves.pas   Sample code modelling waves on elastic surface (solving D'Alamber equation)
Elfield.pas   Models elecTRic field in metal (Cuprum)
Oscdelay.pas   Models oscilations in systems with delaying parts (long wires etc.)
Elmag.pas   Solves Maxwell's equations for metallic disk
LSM.pas   Least squares method for processing experimental data (general case)
LSM1.pas   Least squares method for processing experimental data (case of direct proportion)
Riemann.pas   Delphi unit dealing with mathematical objects such as tensors in Riemann space
Also available at are an equation parser, some Fourier transform code (1D and 2D), some 3D modeling stuff, and a whole lot more. (and yes, The Matrix also distributes matrix unit :^D)

Michael Vinther's AEP analysis in EEG from schizophrenic patients using PCA by P. B. Visscher and D. L. Wewers
As part of a report titled "AEP analysis in EEG from schizophrenic patients using PCA", Michael Vinther has written an EEG Analyzer for which he distributes the complete Delphi source code. Among the routines included in the zipped archive are

A Schrödinger Equation Simulation by P. B. Visscher and D. L. Wewers
P. B. Visscher and D. L. Wewers have developed Program Schrod, a one-dimensional time-dependent Schrödinger equation simulator. The source code is written in Turbo Pascal for Windows.

Calculating Properties of Water & Steam from Gerard Koops & Bernhard Spang
Bernhard Spang used to be the moderator of the Chemical Engineering site at About.com. Together he and Gerard Koops have put together a small library of functions for calculating thermodynamic and transport properties of water and steam. The code has been successfully compiled with Turbo Pascal, Delphi, Free Pascal (DOS) and GNU Pascal (Linux).

 


Artificial Intelligence & Fuzzy Logic

Digitial Filtering, Neural Networks, and Genetic Algorithms from BaseGroup Labs
BaseGroup Labs has put together a very informative and very intriguing web site, published in both English and Russian. Among their offerings is a freeware Delphi component for low pass and Kalmann filtering of time series data. The comments in the code and the component's help file are written in Russian; the algorithms used are documented in English (and I suspect in Russian too) on the BaseGroup website

BIG Update: August 8, 2001
I recently received a lengthy e-mail from Sergey Mironov, the PR Manager of BaseGroup Labs telling me about several new products being developed by his group. Sergey says in part...

First of all I'd like to inform you that LowPassFilter component does not exist anymore. Now it's a part of a larger set components named FilteringBase, which we still distribute as freeware. The set currently includes the TLowPassFilter (a low-pass filter) and TKalmanFiltering (Kalman filter) components.

We'd also like to introduce our GeneBase implementation of genetic algorithms. This includes a TGeneticAlgorithm component that can be used to solve problems of multivariable nonparametric optimization. In particular it allows finding suboptimal solutions for NP-complete problems. The component also allows minimizing and maximizing objective functions.

Our NeuralBase component suite implements the Hopfield network and a multilayer neural net trained with the back propagation algorithm. The following components are included:

  • TNeuralNetHopf - a component implementing the Hopfield neural net
  • TNeuralNetBP - a component implementing the back propagation algorithm
  • TNeuralNetExtend - a component required for compatibility with the Neural Network Wizard
In addition, we have of course added the option to use the trained network.

You should also know about SOMBase, which implements self-organizing maps (Kohonen maps). This is a powerful tool for data analysis. Because Kohonen maps combine two fundamental paradigms of data analysis, namely clustering and projection, they enjoy a wide popularity in data analysis systems. The SOMbase set includes the following components:

  • TSOMap - a component that implements Kohonen's map
  • TDBSOM - a component that implements interface between the self-organizing map, dataset and visualizators
  • TSOMVisualizer - a component that allows getting suitable graphic representation of the trained map

Sergey goes on to say that ALL of the BaseGroup components are distributed as freeware, and ALL are supplied with complete source code (in Delphi 4). Help files are also supplied with each component set. And while the help files are currently available in Russian only, according to Sergey an English version is planned for sometime in the near future. For now, English-only speakers will have to content themselves with the very thorough algorithm documentation provided at the English language version of the BaseGroup Labs website. (e.g., check the pages describing the genetic algorithm and/or the method of conjugate gradients)

Update: January 28, 2002
BaseGroup Labs continues to add to their extensive suite of data analysis tools for Delphi with the release of the WavUtils library. BaseGroup Labs spokeman Sergey Mironov describes WavUtils as "a powerful and flexible mechanism for signal processing used to solve such problems as smoothing, approximation, noise removal and compression of signals. The source code (Delphi 4) is distributed along with the library. The tool library distributed as freeware.

"The library includes functions that implement the following operations:

The WavUtils library implements wavelet transforms using Daubechies wavelets up to 10th order.


NEFCLASS: A Neuro-Fuzzy Classification System
NEFCLASS-PC is a neuro-fuzzy data analysis engine produced by Dr. Detlef Nauck and his colleagues at the Technical University of Braunschweig. Since I know essentially nothing about this software, the best description I can provide comes directly from the NEFCLASS-PC Read.Me file...
NEFCLASS is a neuro-fuzzy model based on a generic 3-layer fuzzy perceptron, and it is used for classifying data (patterns). NEFCLASS is trained with a set of patterns, where each pattern belongs to one of a number of distinct classes (crisp classification). NEFCLASS finds fuzzy rules by scanning the data, and later optimizes these rules by learning the parameters of the fuzzy sets that are used to partition the domain of the input variables (features of the patterns). After the learning process the resulting NEFCLASS system can be used for classifying new, previously unknown data.
NEFCLASS is freely available for scientific and personal use. The source code, which is compatible with Turbo Pascal and DOS versions of Borland Pascal, can be downloaded from the NEFCLASS homepage.

In case you want to learn more about the theory and mechanics of neuro-fuzzy classification, the NEFCLASS authors also provide links to a collection of neuro-fuzzy papers that they've published over the years prior to 1998.


Digital Signal Processing

Intel's Native Signal Processing Library (NSP)
Available from Intel's web site, NSP is a library of 872 procedures and functions -- transforms, convolutions, etc. -- optimized for the Intel architecture. Robert Rossmair has translated the header files for NSP.DLL into Object Pascal. NSP.PAS is a 5000 line import unit which makes all 872 of the library routines available to Delphi programmers.

An FFT in Pascal by Don Cross
Don Cross maintains a site offering a Pascal implementation of the Fast Fourier Transform. In addition, Don also provides a brief FFT tutorial, a section documenting the correct use of the his code, and some links to other DSP/FFT pages.

John Herbster's Glassman FFT
The FFT from Don Cross is a radix 2 algorithm; to use Don's code, the length of your input array must be a power of 2. John Herbster's implementation of the Glassman FFT is a generalized radix algorithm that can handle input arrays of arbitrary length. Prime factoring of the array length speeds things up -- and of course a prime factoring algorithm is included in John's code -- but if your array length is a large prime number, the transform will no longer be a "fast" Fourier transform...it will instead degenerate into a simple discrete Fourier transform (DFT).

You can download a copy of John's code (complete with an example applet coded in Delphi 5) from this site.


A Delphi FFT Unit from Andreas Hofer
Andreas Hofer has (as of 18 June 2002) just released a native Delphi FFT unit that uses a Chirp-Z algorithm to calculate FFTs and inverse FFTs for arbitrary array lengths; that is, the array lengths are NOT required to be a power of 2. However, Andreas' unit offers you the best of both worlds...if your array length IS an integral power of 2, a faster power-of-2 FFT algorithm is used. The unit comes with a help file that integrates directly into Delphi's help system...and for a modest registration fee you can obtain the complete source.

Filip Jurcicek's Wavelets Studio
Wavelets Studio is an exploration of wavelets coded Delphi 1.0; both the source and the exectuables are available for download. The code is based on books published by Charles K. Chui (An Introduction to Wavelets and Wavelets: A Tutorial in Theory and Application). The author summarizes Chiu's work in a postscript document available for download from his (Filip Jurcicek's) homepage.

If you're interested in wavelets, there is also a Delphi version of the Haar wavelet available from an individual calling him/her self the Toxic Avenger

Eugen Tarasov's DSPLAB for Delphi
The following description was hijacked directly and entirely from the DSPLab for Delphi website on 28 November, 2002:
DSPLab is a library of Delphi components for digital signal processing. The library contains three components: Butterworth, Bessel and Chebyshev infinite-impulse-response (IIR) filters, with lowpass, highpass, bandpass or bandstop characteristcis. You can build the filter of first order, filter of second order, and so on. The maximal order of filter is eight.
Those of you who are interested might also want to check out the description of DSPLab's data types & class hierarchy. DSPLab is distributed as shareware. Registration (a mere 17 USD) buys you the complete source code, which includes a complex numbers module.

Janez Makovsek's Basic Delphi Signal Processing Package (BDSPP)
Janez Makovsek has put together a collection of Delphi components that interface with Intel's Native Signal Processing Library. In addition to computing FFTs, the Basic Delphi Signal Processing Package includes components for run-time digital filter design and filtering, decimation, interpolation, and convolution. The BDSPP distribution uses and includes 6 DLLs which have been slimmed down to about 500 kb. (This represents a major savings of space when compared to the 12+ megabytes required by the full NSP installation.)

George Beckett's Delphi interface unit for FFTW
George Beckett developed a Delphi translation for the C header file of the mighty FFTW package developed at MIT. You can download your copy, AND pick up a few valuable usage tips from the Windows Installation Notes section of the FFTW website. (For those unfamiliar with this library, FFTW stands for the "Fastest Fourier Transform in the West")


Page Curator: Mark Vaughan