

                       COLLINS MATH LIBRARY v1.0

First off, I am not a professional numerical analyst.  I am a professional
computer programmer with a background in engineering (chemical) and have
been an (enthusiastic) amateur numerical analyst since my undergraduate days.

The included C math library is a mixture of experimental stuff (which I read
about in journals and then implemented) and tried-and-true stuff (eg, routines
from Forsythe, Malcolm, & Moler) which I have translated from another language,
or to conform to my own ideas about programming efficiency and aesthetics.

The library is composed of the following subdirectories:

  \FUNCS\
    Routines for special FUNCtions. I have always been fascinated by
    calculation techniques for the bessel functions, and they are the
    most heavily represented.

  \INCLUDE\
    <collins.h>  contains all of the prototypes for the library.
    <tstfxns.h>  contains prototypes for nonlinear/optimization test problems.

  \LE\
    Routines for Linear systems of Equations. These are just my translations
    of a couple of LU decomposition routines. If you are really into linear
    systems, I would suggest you look for the Meschach Library v1.2b by
    DE Stewart & Z Leyk.  It is a very comprehensive library (with C source!),
    and best of all it's on the net and it's free!

  \MISC\
    Miscellaneous routines.  The most important are 7 or 8 random number
    generators in <random.c> and the vector/matrix allocation routines in
    <nrutils.h>.  The latter are derived from Numerical Recipes (2nd ed).
    Also, <tstfxns.c> contains a set of functions for testing the optimization
    and non-linear equation routines.

  \NLE\
    Routines for Non-Linear Equations.  This has been my main area of interest
    for the past couple of years, so there are lots of different methods. My
    personal favorites are the Ip & Todd <nleit.c> and the vectorized Wegstein
    <nleweg.c> methods.

  \ODE\
    Routines for Ordinary Differential Equations. This was another area of
    interest for several years. I never have been very satisfied with the
    Burlisch-Stoer <bsode.c> or stiff <stiff.c> modules, but all of the
    Runge-Kutta code works very well.  Incidently, I did not include a
    quadrature subdirectory -- when I want to do quadrature, I set up the
    corresponding initial value ODE and use one of the methods from this
    subdirectory.

  \OPTIM\
    Routines for OPTIMization.  This has been my another area of interest for
    the past several years, so again, there are lots of different methods. My
    favorite is WC Davidon's 1975 method <qcdav.c>.  For sheer simplicity and
    economy of storage, I also am a fan of Borwein & Barzilai's recent method
    <bandb.c>.

  \SPLINES\
    This name is misleading, these are actually fast transforms.  <fft.h> is
    your typical Fast Fourier Transform.  <fht.h> is the lesser known Fast
    Hartley Tranform. This was adapted from Pascal source that appeared in a
    BYTE article.  At one time, this subdirectory contained cubic spline and
    cubic polynomial interpolation routines, but these were accidently deleted
    some time ago.


What's missing?  Well, lots of stuff, like routines for:
    eigenvalues/vectors, data regression, curve fitting, boundary value ODEs,
    PDEs, finite elements, etc.


I just haven't had the time (or in some cases the inclination) to delve into all
of these areas.  Which is surprising, since I started putting this library
together way back in 1988....On the other hand, a good chunk of my time was
spent converting the library from FORTRAN to C in 1992 (if anyone's interested,
I still have the FORTRAN code for some of these routines).  And lately, a good
chunk of my time has gone into studying and writing routines to do cryptography.
I would be interested in hearing from you if you have written routines for the
areas that are missing from this library.

Finally, for those of you who are interested in numerical analysis in C, let me
recommend three libraries that I have found both useful & educational:

    The C/Math Toolchest
    Mix Software
    $30

    The Meschach Library
    DE Stewart & Z Leyk
    (Free - from Netlib)

    Numerical Recipes (2nd ed)
    WH Press, SA Teukolsky, WT Vetterling, & BP Flannery
    $50



A few words of warning about the source code:

     - I make heavy use of C++ style inline comments (//). This is not part of
       the ANSI standard, but most compilers support it.

     - Please read the header in each source file. It will usually contain a
       reference to the literature which describes the algorithm being
       implemented.

     - The convergence criteria for the \OPTIM\ & \NLE\ routines is not entirely
       satisfactory for all problems...try playing with it.

     - You will see a lot of printf() statements that were put in the code for
       debugging purposes, or to follow the progress of an algorithm.  I have
       commented these out, but left them in place in case you need them after
       making your own changes to the algorithms.

     - I lapse into hungarian notation for my variable names. It's a hard habit
       to break, even though I realized long ago that hungarian notation isn't
       as useful for numeric programming (EVERYTHING is a float/double except
       the loop control variables!) as for normal applications programming.



Glynne Casteel
GlynneC@ix.netcom.com
9-Apr-95
