{CMPXLIB: Complex math library for Pascal; by Ron Finger}
Procedure CPERM(N:Complex);
{to make complex number permanent}
Procedure CERASE(N:Complex);
{to release temporary complex variables}
Function CMPLX(R,I:Real): Complex;
{to create complex number with cartesian coordinates}
Function RE(N:Complex): Real;
{returns real part of complex number}
Function IM(N:Complex): Real;
{returns imaginary part of complex number}
Function PHASOR(M,A:Real): Complex;
{to create phasor from magnitude and angle}
Function MAG(N:Complex): Real;
{returns magnitude part of phasor}
Function ANG(N:Complex): Real;
{returns angle part of phasor}
Function CMPXO(N1:Complex;OP:Char;N2:Complex): Complex;
{to add, subtract, miltiply, or divide complex numbers}
Function POLAR(N:Complex): Complex;
{to convert complex number from cartesian to polar coordinates}
Function CART(N:Complex): Complex;
{to convert complex number from polar to cartesian coordinates}
Function CSQR(N:Complex): Complex;
{square of complex number, SQR(N)}
Function CSQRT(N:Complex): Complex;
{square root of complex number, SQRT(N)}
Function CRECP(N:Complex): Complex;
{recripical of complex number, 1/N}
Function CONJG(N:Complex): Complex;
{conjugate of a complex number}
Function CABS(N:Complex): Real;
{absolute value of complex number, ABS(N)}
------------------------------------------------
{MATHLIB.INC math utility library by Ron Finger}
Function SIGN(X:Real):Integer;
{Returns sign of argument as +1, -1, or 0}
{Common LOG Functions}
Function LOG10(X:Real): Real;
{LOG (BASE 10) Function}
Function ALOG10(X:Real): Real;
{ANTILOG (BASE 10) Function}
{Power Functions}
Function POWER(X:Real;N:Integer): Real;
{Computes Real X raised to Integer power N iteratively}
Function CUBE(X:Real): Real;
{Cube Function}
Function CBRT(X:Real): Real;
{Cube root function}
Function RPOWER(X,N:Real): Real;
{Computes Real X raised TO Real power N}
Function NLEN(X:R
|