Dew MtxVec NET
Math387 Unit
Summary
High performance math functions.
Description
Introduces high performance math functions. It can serve as replacement for the default Delphi Math.pas unit and offers full support for complex numbers. However, in many applications, you can obtain better performance with vector arithmetics.

Classes

 Name  Summary 
EMtxVecException Base exception class for MtxVec library Parent class for all exception classes in MtxVec library. 
EMtxVecInvalidArgument Exception class indicates invalid arguments error. 
EMtxVecRangeError Exception class indicates out of range error. 
EOutOfMemory Exception class indicates out of memory error. 

Types

 Name  Summary 
PByte A pointer to Byte type. 
PCplx A pointer to TCplx type. 
PInteger A pointer to integer type. 
PPCardinal  
PPDouble  
PPInt64  
PPInteger  
PPSample  
PPShortInt  
PPSingle  
PPSmallInt  
PPUChar  
PPWord  
PSample A pointer to TSample type. 
PSmallInt A pointer to TISample type. 
PWord A pointer to Word type. 
StringArray  
T2DCplxArray Two dimensional array of TCplx type. 
T2DSampleArray Two dimensional array of TSample type. 
TCompare Defines comparison type for the Equal function. 
TCplx Default complex number type used by Math387. 
TCplxArray Array of TCplx type. 
TDCplx Complex number type for double real and complex part. 
TFFTStorageFormat Type used to define the storage format for FFT operations. 
TICplx Complex number type for integer real and complex part. 
TIndexType Type used to define indexation type. 
TIntArray Array of Integer type. 
TIntegerCplx Complex number type for integer real and complex part. 
TISample Signed 2 byte integer. 
TMtxNotifyEvent  
TPrecision Defines the storage precision. 
TRounding Defines rounding algorithm. 
TSample Default real number type used in Math387. 
TSampleArray Array of TSample type. 
TSCplx Complex number type for single real and complex part. 
UInt  

Routines

 Name  Summary 
ArcCos Inverse cosine. 
ArcCosh The inverse hyperbolic cosine. 
ArcCot Inverse cotangent. 
ArcCoth Inverse hyperbolic cotangent. 
ArcCsc Inverse cosecant. 
ArcCsch Inverse hyperbolic cosecant. 
ArcSec Inverse secant. 
ArcSech Inverse hyperbolic secant. 
ArcSin Inverse sine. 
ArcSinh The inverse hyperbolic sine. 
ArcTan Inverse tangens of X. 
ArcTan2 Inverse tangens of Y/X. 
ArcTanh The inverse hyperbolic tangens. 
Arg The argument of Z. 
BesselI0 Modified bessel function of the first kind. 
BesselJ0 Bessel function of the first kind. 
Bigger Compares two numbers. 
BiggerOrEqual Compares two numbers. 
CAbs The norm of Z. 
CAbs1 Returns the approximation of the norm of Z. 
CAdd Complex addition. 
CAddI Add imaginary value BI to complex number A. 
CartToPolar Cartesian to polar coordinate transformation. 
CDiv Complex division. 
Ceil Round towards positive infinity. 
CFrac Complex frac function. 
CheckRange Check the value. 
CInv The 1/Z. 
ClearFPU Clears pending FPU exceptions. 
CMul Complex multipliction. 
CMulI Multiply two complex numbers. 
Conj Conjugate complex number. 
Cos  
Cosh Hyperbolic cosine. 
Cot Cotangent. 
Coth Hyperbolic cotangent. 
Cplx Converts two real numbers to complex number. 
CplxToStr Converts complex number to a string. 
CRound Complex round function. 
Csc Cosecant. 
Csch Hyperbolic cosecant. 
CSqr The square of complex number. 
CSqrt Square root of a complex number. 
CSub Complex subtraction. 
CSubI Subtract imaginary value BI from complex number A. 
CTrunc Complex truncate function. 
DegToRad Returns the value of a degree measurement expressed in radians. 
EInvalidArgumentRaise Procedure raises EMtxVecInvalidArgument exception. 
EnsureRange Limits the value. 
Equal Compares two numbers. 
ERaise Procedure raises MtxVecException exception. 
ERangeErrorRaise Procedure raises EMtxVecRangeError exception. 
Exp e^x function. 
Exp10 10^x function. 
Exp2 2^x function. 
Expj Euler formula for complex number. 
ExtractCplx A complex number, extracted from string source. 
ExtractSample A TSample number, extracted from string source. 
Fact Factorial N!. 
FixAngle Sets angle in [-2p,2p]
Flip Swaps real and imaginary part. 
FlipConj Swaps real and imaginary part and conjugates the result. 
Floor Round towards negative infinity. 
FormatCplx The complex number Z formated as a string. 
FormatSample The TSample number X formated as string. 
Gamma Gamma function. 
Gcd Greatest common divisor. 
Imag Imaginary part of complex number. 
IntPower Power function (integer power). 
IsInf Checks if number is INF. 
IsInfNan Checks if number is INF or NAN. 
IsNan Checks if number is NAN. 
IsNanInf Checks if number is INF or NAN. 
LargestExp2 Returns first number being power of two that is equal or greater than n. 
LargestLog2 Returns power of two which gives the first number that is equal or greater then n. 
Lcm Smallest common multiplier. 
LimitRange Limit the range X. 
Ln Natural logarithm. 
LnGamma Natural logarithm of the gamma function. 
Log10 Log base 10. 
Log2 Log base 2. 
LogN Log base N. 
Max Maximum of two numbers. 
Min Minimum of two numbers. 
MulI Multiplies complex number with I. 
Neg Changes the sign of Z. 
Norm The ||Z||^2. 
PolarToCart Polar to cartesian coordinate transformation. 
Power Power function. 
Pythag The Pythagora formula. 
RadToDeg Converts radians to degrees. 
Real Real part of complex number. 
Rem The reminder after division. 
Root The root of complex number. 
SampleToStr Converts TSample value to a string. 
Sec Secant. 
Sech Hyperbolic secant. 
Sgn Signum. 
Sign Fortran sign function. 
Sin  
SinCos Sine and cosine in single pass. 
Sinh Hyperbolic sine. 
SinhCosh The hyperbolic sine and cosine. 
Smaller Compares two numbers. 
SmallerOrEqual Compares two numbers. 
SmallestExp2  
StrToCplx Converts a string to complex number. 
StrToSample Converts string to a TSample value. 
StrToVal Converts string to a value. 
Swap Exchange two numbers. 
Tan Tangens. 
Tanh Hyperbolic tangens. 
TruncAndFrac Splits the floating point number to integer and fractional parts. 

Vars

 Name  Summary 
CINF Complex version of INF. 
CNAN Complex version of NAN. 
INF Positive Infinity. 
MtxVecBlockSize Defines the block size. 
MtxVecPrimeArray Holds an array of 1000 prime numbers. 
NAN Not a number. 

Constants

 Name  Summary 
C_I Imaginary value. 
C_ONE Complex one. 
C_PI Pi. 
C_pi_div_2 Pi/2.= PI/2+0*i. 
C_ZERO Complex zero. 
CGOLD 2 - GOLD. 
EPS Epsilon. 
EULERGAMMA Euler constant. 
Fortran8087CW FPU control word used by Fortran. 
GOLD Golden Mean. 
INVLN10 1/Ln(10). 
INVLN2 1/Ln(2). 
INVPI180 180/PI. 
INVSQRT2PI 1/Sqrt(2PI). 
INVTWOPI 1/2PI. 
LN10 Ln(10). 
LN2 Ln(2). 
LN2PIDIV2 Ln(2*PI)/2. 
LNPI Ln(PI). 
LNSQRT2PI Ln(Sqrt(2*PI)). 
MACHEP Machine constant. 
MAXFAC Maximum factorial. 
MAXGAM Maximum value of the gamma function. 
MAXLGM Maximum allowed value for the logarithm of the gamma function. 
MAXLOG Largest result of a base 10 logarithm. 
MAXNUM Maximum floating point number. 
MINLOG Smallest result of a base 10 logarithm. 
MINNUM Minimum floating point number. 
MtxVec8087CW FPU control word turning off all exceptions. 
MtxVecEOA End of array constant. 
MtxVecVersion MtxVec version. 
mvsp2  
nmfft  
nmrnd  
PI PI. 
PI180 PI/180. 
PIDIV2 PI/2. 
SQRT2 Sqrt(2). 
SQRT2DIV2 Sqrt(2)/2. 
SQRT2PI Sqrt(2PI) = Sqrt(2PI) 
SQRTEPS Sqrt(EPS). 
SQRTPI Sqrt(PI). 
TWOPI 2*PI. 
vmlname  

Copyright 2008 Dew Research
http://www.dewresearch.com