Dec 172017
 
Turbo C math library.
File CMATH.ZIP from The Programmer’s Corner in
Category Files from Magazines
Turbo C math library.
File Name File Size Zip Size Zip Type
CMATH.DOC 12287 1807 deflated
CMATH.H 725 250 deflated
CMATHC.LIB 5120 2130 deflated
CMATHH.LIB 5120 2262 deflated
CMATHL.LIB 5120 2141 deflated
CMATHM.LIB 4608 2003 deflated
CMATHS.LIB 4608 1992 deflated
CMPLX.C 891 403 deflated

Download File CMATH.ZIP Here

Contents of the CMATH.DOC file





Cmath.lib








A set of "complex" math library functions for Turbo C









By: Chuck G. Smith
CIS :75036,2663
GENIE :CHUCK.SMITH



Introduction:

The branch of complex mathematics is one that normal
mathematic functions cannot apply directly. This led to creation
of CMATH . CMATH allows a TC programmer to use the extend realm of
math functions that apply to engineering, physics, chemistry
,mathematics and the newest branch of geometry - Fractal
graphics.
Any additional functions that would be useful can be
added at your request provided that the algorithm is readily
available. Comments , suggestions and questions are invited.


This library has been tested by the use of a HP-15c, and
common sense. No warranty is implied as to its accuracy.

Note:
To use the library CMATHx use the project make in
TC.EXE or link it in with TCC&TLINK. The .LIB format is from MS
lib.exe. DO NOT split up the library because this will render it
useless.


What you should have:

CMATH(x).LIB - x=S,M,C,L,H For the corresponding
memory model.
CMATH.H - header file for cmath
CMATH.DOC - This File.



CMATH source code is commercially available for license
by the author.


Notational Convention
For
CMATHx.LIB


The following pages contain the information for
cmath(x).lib . The structure is straight-forward and basic. In
some descriptions the word "cmplx" is an abbreviation for "struct
complex" .The "struct complex" is the same one defined in
"MATH.H".Also note the difference between *z and z. Except for
cnvpolar and cnvrect 'struct complex z' is used as the return
result, this method of return was chosen for its simplicity and
due to the lack of 'C's ability to return a structure(instead of
maintaining a pointer to a common result structure).
The (x) is the same as the first letter of the
associated "MATH(x).LIB" used for each memory model.

Function Name : cnvpolar In Module : cmath(x).lib

Params : struct complex *x

Returns : nothing

Modifies : struct x





Needed to Compile :math.h

Current Revision :12/26/87





Comments / Documentation :
cnvpolar converts the complex number to its polar
representation. This polar conversion RESPECTS 0 to 60 unlike
most hand held calculators which only respect +/-0 to 180. the
function directly modifies the input structure.
***Note: The angles are DEGREES.


Function Name : cnvrect In Module : cmath(x).lib

Params : struct complex *x

Returns : nothing

Modifies : struct x





Needed to Compile :math.h

Current Revision :12/26/87





Comments / Documentation :
cnvrect converts the input polar number in the form r/_zx.
it directly modifies the input struct.
***Note: Angles must be in degrees.


Function Name : cinverse In Module : cmath(x).lib

Params : struct complex *x,*z

Returns : nothing

Modifies : struct z





Needed to Compile :math.h

Current Revision :12/26/87





Comments / Documentation :

Calculates 1/(a+jb) result is stored in struct z.


Function Name : ix In Module : cmath(x).lib

Params : struct complex *y,*x,*z

Returns : nothing

Modifies : struct z





Needed to Compile :math.h

Current Revision :12/26/87





Comments / Documentation :
calculates complex multiplication (x*y) stores result in
struct z.


Function Name : id In Module : cmath(x).lib

Params : struct complex *x,*y,*z

Returns : nothing

Modifies : struct z





Needed to Compile :math.h

Current Revision :12/26/87





Comments / Documentation :
calculates complex division (x/y) stores result in
struct z.


Function Name : ia In Module : cmath(x).lib

Params : struct complex *x,*y,*z

Returns : nothing

Modifies : struct z





Needed to Compile :math.h

Current Revision :12/26/87





Comments / Documentation :
calculates complex addition (x+y) stores result in
struct z.













Function Name : is In Module : cmath(x).lib

Params : struct complex *x,*y,*z

Returns : nothing

Modifies : struct z





Needed to Compile :math.h

Current Revision :12/26/87




Comments / Documentation :
calculates complex subtraction (x-y) stores result in
struct z.












Function Name : ip In Module : cmath(x).lib

Params : struct complex *x,double power, cmplx *z

Returns : nothing

Modifies : struct z





Needed to Compile :math.h

Current Revision :12/26/87





Comments / Documentation :
calculates complex power of x^power stores result in
struct z.


Function Name : ipr In Module : cmath(x).lib

Params : struct complex *x,double power,cmplx *z

Returns : nothing

Modifies : struct z





Needed to Compile :math.h

Current Revision :12/26/87





Comments / Documentation :
calculates the primary complex (power'th) root of (x)
stores result in struct z.











 December 17, 2017  Add comments

Leave a Reply