| EFLIB: An Extended Function Library by Johan Larsson | |
| Pascal-XSC |
| MathWizard: a CAS in Pascal by Jonathan Luyckx | |
| Marco van de Voort's symbolic solver for Free Pascal & Delphi | |
| Symbolic differentiation using DiffExpress | |
| PAS Math: a CAS developed under GPL | |
| TCioinaEval: a fast and full-featured expression parser from Alexei Cioina | |
| Stefan Hoffmeister's Mathematical Expression Evaluator | |
| Vladimir Safin's Formula Compiler and other mathematical software for Delphi |
| Jean Debord's Turbo Pascal Math Library | ||
| Earl F. Glynn's Computer Lab | ||
| Jean-Didier Gayrard's MathLib2 : a Turbo Pascal math functions library | ||
| fsUltra : a pseudo-random number generator | ||
| Mark Horridge's SparSolv Unit for sparse linear systems | ||
| Lluis Olle's SparLin, a Delphi component for sparse linear systems | ||
| The MtxVec Library from Dew Research | ||
| David Butler's Delphi Fundamentals: mathematical routines and other goodies | ||
| Delphi Mathematics Components from Hans Lohninger | ||
| Numeric-Tools: a Delphi equation-solving component | ||
| ChroMathSome for Delphi by John Merrit | ||
| Coherent Cognition's MacMathPascal Library | ||
| Jean-Pierre Moreau's Numerical Analysis website | ||
| An operations research library from Seoul National University | ||
| Marco van de Voort's numerical mathematics library for Free Pascal | ||
| Han de Bruijn's Industrial and Applied Mathematics page | ||
| Herbert Sauro's TLSODA for ordinary differential equations | ||
| Antonio Gornia's Simultaneous Equation Solvers | ||
| Volker Walter's Amoeba: A Nelder-Mead Solver | ||
| Petr Mikulik's mathematical freeware (including a Levenberg-Marquardt routine) | ||
| Michael Perdue's nonlinear regression code | ||
| Source code for engineering students from Annibal Hetem, Jr. | ||
| Ray Lischner's tools for floating point calculations in Delphi | ||
| Dmitriy Anisimkov's Integer and Linear Programming (and FFTs and other goodies) | ||
| Markus Weidenauer's LP-Optimizer | ||
| Glenn Crouch's Delphi Math Unit and Scientific Calculator | ||
| From ESB Consultancy, Alan Miller's Random Number Module | ||
| ESB's Professional Computation Suite | ||
| StatUnit from The Institute of Mathematical Statistics | ||
| Applied statistics algorithms from StatLib | ||
| Pascal code for computing a matrix of tetrachoric correlation coefficients | ||
| Fred Edberg's Delphi Regression Components | ||
| Delphi Statistics Components for Databases from Applied Analytical Systems | ||
| Das Mathe-Programm der DPG | ||
| The Stony Brook Algorithm Repository maintained by Steven S. Skiena | ||
| A Scientific Subroutine Library for Turbo Pascal | ||
| Rene Tschaggelar's Delphi mathematics solutions | ||
| The EBK&NVS Pascal-Delphi Math Library | ||
| Kjell Rilbe's complex number class for Delphi | ||
| SWAG : the SourceWare Archival Group | ||
| The Mathematics & Statistics section of Torry's Delphi Pages | ||
| John Stockton's Borland Pascal Maths Page | ||
| Ernie Deel's EFD Systems Tools | ||
| Random numbers from the Mersenne Twister | ||
| Bent Nielsen's Special Functions Library | ||
| Robert Bullock's Delphi math units | ||
| Franz Glaser's TP-Links | ||
| Techniques of Scientific Computing from Monash University | ||
| Delphi Tools for Physics at Davidson College | ||
| UDDF: the Unofficial Delphi Developers FAQ | ||
| Some Optimization Codes in the Public Domain | ||
| The Home of the Hammster | ||
| Bob Ferguson's Mathematical Freeware | ||
| Harry J. Smith's Fun With Mathematics | ||
| Andrew Williams' Mandlebrot Set project | ||
| The Turbo Pascal Programmers' Page | ||
| A Simulation Toolbox from Lin Jensen of Bishop's University | ||
| William F. Polik's Turbo Pascal Procedures and Functions library | ||
| Mark Myatts's statistical utilities | ||
| Berend Tober's Delphi math routines | ||
| A Random Number Test Suite from StreamSec.com | ||
| Satya's collection of Numerical Methods in Pascal | ||
| Crout's method in Delphi | ||
| FitAll: nonlinear regression analysis from MTR Software | ||
| The SysTools Library from Turbo Power Software | ||
| Bill Miller's OpenStats2: an open-source statistical analysis package | ||
| Fit Simplex, a curve-fitting program from Julien Bobroff | ||
| Scientific Mathematics: using Exentia and byte-alignment for fasting floating point operations | ||
| Vector mathematics in two and three dimensions | ||
| A large collection of mathematical source code from the Pascal.Sources.Ru website | ||
| Mathematical goodies from Borland's Code Central | ||
| Mathematics units in the Free Pascal archives | ||
| B-Spline code from NIST | ||
| Delphi number-crunching components from Nils Haeck | ||
| Numerical methods code from the University of Aarhus | ||
| Arash Partow's FastGEO library for computational geometry | ||
| [New!] GrMikeD's solutions to the traveling salesman problem |
| [updated] Marcel Martin's Large Integer Library | |
| Walied Othman's FGInt: Fast Gigantic Integers | |
| A large integer arithmetic unit by Keith Briggs |
| Sergey Sadov's scientific software for scattering matrix calculations | ||
| FDTD: Finite-Difference Time-Domain code for Delphi | ||
| Eugeny Shybanov's large particle Mie-scattering code | ||
| DSpatial: tools for the manipulation and visualization of satellite imagery | ||
| The Matrix: mathematica physics coded in Delphi | ||
| [New!] Michael Vinther's AEP analysis in EEG from schizophrenic patients using PCA | ||
| A Schrödinger Equation Simulation by P. B. Visscher and D. L. Wewers | ||
| Steam calculations from Gerard Koops & Bernhard Spang |
| Digitial Filtering, Neural Networks, and Genetic Algorithms from BaseGroup Labs | ||
| NEFCLASS-PC: A Neuro-Fuzzy Classification System | ||
| Pieter Spronck's Elegance: genetic algorithms in Delphi | ||
| An Introduction to Evolutionary Algorithms from Dan Taylor | ||
| The Inference Engine Component Suite from RiverSoftAVG |
| Robert Rossmair's Delphi interface unit for The Intel Signal Processing Library | ||
| Don Cross's FFT code and tutorial | ||
| John Herbster's generalized radix FFT code | ||
| Andreas Hofer's Delphi FFT Unit | ||
| Filip Jurcicek's Wavelets Studio for Delphi | ||
| Eugen Tarasov's DSPLab for Delphi | ||
| METEOR: FIR filter design from Steiglitz, Parks, and Kaiser | ||
| Janez Makovsek's Basic Delphi Signal Processing Package (BDSPP) |
 
Symbolic Expression HandlingMarco'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!Primitives for Rearranging Expressions
- Simple operators on expressions ( + / * - ^ )
- Derivatives for simple functions (all operators + most functions in the Free Pascal math unit)
- Taylor series
High Speed Evaluation (parse once, evaluate often principle)
- Identifying of terms
- Simple simplying (e.g., 2*2*x -> 4*x)
Cross-platform Development
- Infinite variables
- Infinite (symbolic) constants
- Fast (hopefully!)
- Compiles under Free Pascal for multi-platform support
- with a few simple (and obvious?) changes, will also compile under Delphi
AidAim Software, the authors of DiffExpress, also distribute an expression evaluator called CalcExpress. Like DiffExpress, CalcExpress is freeware with full source.
| 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 |
To download the initial trial version of TCioinaEval, click here.
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:
Five logical algebraic operations are defined on a domain
- Closed Ellipse with rotation angle;
- Closed Rectangle with rotation angle; and
- Closed Round Rectangle with rotation angle.
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.
- Union
- Intersection
- Compliment
- Difference
- Symmetrical Difference
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.
| 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.) | |
The following programs are now availble on the TPMath web page:
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.
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
There's a genuine wealth of information and code (and opinion!) at this site; it's definitely worth a visit.
LSODA can dynamically switch integration method according to how
stiff the problem is. The two methods employed include:
| 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 |
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).
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.
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
ComplexOps may be freely distributed ONLY for non-commercial use. You can download a copy here
The Graphics Library may be freely distributed ONLY for non-commercial use. You can download a copy here
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.
| 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 |
Caution: MT is for MonteCarlo, and is NOT SECURE for CRYPTOGRAPHY as it is.
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!!
> I'm looking for a Unit or just some Code to have larger (unsigned)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"
> Integers than a Int64. For the moment I have a Unit that provides a
> 128-Bit unsigned integer, anything else out there?
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.
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.
Chris's demo uses SIMD code provided by Stefano Tommesani's freeware Exentia library.
| 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. |
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
(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...)
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.
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:
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!)
 
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.
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!
| 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 |
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:
In addition, we have of course added the option to use the trained network.
- 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
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)
"The library includes functions that implement the following operations:
"
The WavUtils library implements wavelet transforms using Daubechies wavelets up to 10th order.
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.
You can download a copy of John's code (complete with an example applet coded in Delphi 5) from this site.
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.