TESBMathsLib component for TMS Software's TAdvSpreadGrid
for Borland Delphi 3.0, 4.0, 5.0, 6.0 & C++ Builder 3.0, 4.0 & 5.0
version 1.0, 14 June 2001

Adds 46 Constants and 19 Functions to TAdvSpreadGrid.
Freely available to all users of TAdvSpreadGrid.

written by
    ESB Consultancy
    Copyright  2001
    Email:support@esbconsult.com.au
    Web:http://www.esbconsult.com.au

Based on work by
    TMS Software
    Copyright  2001
    Email:info@tmssoftware.com
    Web:http://www.tmssoftware.com

Requires the Freeware ESBMaths available from:
    http://www.esbconsult.com.au

    NOTE: ESBMaths v3.2.1 or higher is needed

and naturally also requires TAdvSpreadGrid from:
    http://www.tmssoftware.com.au

The source code is given as is. The author is not responsible
for any possible damage done due to the use of this code.
The component can be freely used in any application. The complete
source code remains property of the author and may not be distributed,
published, given or sold in any form as such. No parts of the source
code can be included in any other component or application without
written authorization of the author.
************************************************************************

For even more Constants and Functions, registered owners of ESBPCS get
free access to the ESBPCS MathLibs for TAdvSpreadSheet. Check out ESBPCS
at http://www.esbconsult.com.au/esbpcs.html

************************************************************************
Installation

Place ESBMathsLib.pas and ESBMathsLib.dcr into the same directory as
ESBMaths.pas. Ensure that this directory is in your Library Path.

Add ESBMathsLib.pas to either an existing Package or a new one, so that
the ESBMathsLib component is available.

************************************************************************
Constants Supplied:

SQRT2 - Square root of 2
SQRT3 - Square root of 3
SQRT5 - Square root of 5
SQRT10 - Square root of 10
SQRTPI - Square root of Pi
CBRT2 - Cube root of 2
CBRT3 - Cube root of 3
CBRT10 - Cube root of 10
CBRT100 - Cube root of 100
CBRTPI - Cube root of Pi
INVSQRT2 - Inverse of Square root of 2
INVSQRT3 - Inverse of Square root of 3
INVSQRT5 - Inverse of Square root of 5
INVSQRTPI - Inverse of Square root of Pi
INVCBRTPI - Inverse of Cube root of Pi
ESBE - Natural Constant, e
ESBE2 - Square of the Natural Constant, e
ESBEPI - Natural Constant, e, raised to the power of Pi
ESBEPION2 - Natural Constant, e, raised to the power of Pi/2
ESBEPION4 - Natural Constant, e, raised to the power of Pi/4
LN2 - Natural Logarithm of 2
LN10 - Natural Logarithm of 10
LNPI - Natural Logarithm of Pi
LOG10BASE2 - Logarithm of 10 to Base 2
LOG2BASE10 - Logarithm of 2 to Base 10
LOG3BASE10 - Logarithm of 2 to Base 10
LOGPIBASE10 - Logarithm of Pi to Base 10
LOGEBASE10 - Logarithm of e (natural constant) to Base 10
ESBPI - Pi
INVPI - Inverse of Pi, 1 / Pi
TWOPI - 2 * PI
THREEPI - 3 * PI
PI2 - Square of Pi
PITOE - Pi raised to the power of e (natural constant)
PION2 - Pi / 2
PION3 - Pi / 3
PION4 - Pi / 4
THREEPION2 - 3 * Pi / 2
FOURPION2 - 4 * Pi / 3
TWOTO63 - 2 raised to the power of 63
ONERADIAN - One Radian expressed in Degrees
ONEDEGREE - One Degree expressed in Radians
ONEMINUTE - One Minute expressed in Radians
ONESECOND - One Second expressed in Radians
ESBGAMMA - Gamma Constant
LNRT2PI - Natural Logarithm of the Square Root of (2 * Pi)

*************************************************************************
Functions Supplied:

GCD (X, Y) - Greatest Common Divisor of X and Y
	0 <= X <= High (LongWord), X will be rounded if not integral
	0 <= Y <= High (LongWord), Y will be rounded if not integral

LCM (X, Y) - Lowest Common Multiplier of X and Y
	Low (LongInt) <= X <= High (LongInt), X will be rounded if not integral
	Low (LongInt) <= Y <= High (LongInt), Y will be rounded if not integral

RELPRIME (X, Y) - Returns 1 if X and Y are Relatively Prime to each other,
	Otherwise 0
	0 <= X <= High (LongWord), X will be rounded if not integral
	0 <= Y <= High (LongWord), Y will be rounded if not integral

DISTANCE (X1, Y1, X2, Y2) - Returns the straight line distance between
	(X1, Y1) and (X2, Y2)

EXTMOD (X, Y) - Returns Floating Point Modulus.
	ExtMod := X - Floor ( X / Y ) * Y
	Y <> 0

EXTREM (X, Y) - Returns Floating Point Remainder.
	X - Int ( X / Y ) * Y
	Y <> 0

ESBFACT (X) - Returns Factorial X.
	0 <= X <= 1754, X will be rounded if not integral

ESBPERM (N, R) - Returns the number of Permutations of R Objects from N.
	0 <= N <= 1754, N will be rounded if not integral
	0 <= R <= N, R will be rounded if not integral

ESBCOMB (N, R) - Returns the number of Combinations of R Objects from N.
	0 <= N <= 1754, N will be rounded if not integral
	0 <= R <= N, R will be rounded if not integral
	Also known as the Binomial Coefficient

ESBTAN (X) - Returns the Tangent of Angle X, given in Radians
	abs (x) < 2^63

ESBCOT (X) - Returns the CoTangent of Angle X, given in Radians
	abs (x) < 2^63

ESBARCTAN (X, Y) - ArcTangent of Y / X - Result is in Radians

ESBARCCOS (X) - ArcCosine of X - Result is in Radians

ESBARCSIN (X) - ArcSine of X - Result is in Radians

GAMMA (X) - Returns Gamma (X)

INVGAMMA (X) - Returns Inverse of Gamma (X)

LNGAMMA (X) - Returns Natural Logarithm of Gamma (X)
	X > 0

BETA (X, Y) - Returns Beta (X, Y)

INCOMPBETA (X, P, Q) - Returns Incomplete Beta Ix (P, Q)
	0 <= X <= 1, P > 0, Q > 0

*************************************************************************

See ESBProduct.PDF for other products from ESB Consultancy

mailto:support@esbconsult.com.au
http://www.esbconsult.com.au
